o

com.digitalasset.canton.serialization

DeterministicEncoding

object DeterministicEncoding

The methods in this object should be used when a deterministic encoding is needed. They are not meant for computing serializations for a wire format. Protobuf is a better choice there.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DeterministicEncoding
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. def decodeBytes(bytes: ByteString): Either[DeserializationError, (ByteString, ByteString)]

    Extract a byte-string (length stored) from another ByteString

  7. def decodeInstant(bytes: ByteString): Either[DeserializationError, (Instant, ByteString)]

    Decode a java.time.Instant from a com.google.protobuf.ByteString and return the remainder of the com.google.protobuf.ByteString.

  8. def decodeInt(bytes: ByteString): Either[DeserializationError, (Int, ByteString)]

    Consume and decode a fixed-length big-endian scala.Int and return the remainder of the com.google.protobuf.ByteString.

    Consume and decode a fixed-length big-endian scala.Int and return the remainder of the com.google.protobuf.ByteString.

    Inverse to DeterministicEncoding.encodeInt

  9. def decodeLong(bytes: ByteString): Either[DeserializationError, (Long, ByteString)]

    Decode a scala.Long from a com.google.protobuf.ByteString and return the remainder of the com.google.protobuf.ByteString.

  10. def decodeSeqWith[A](bytes: ByteString)(decode: (ByteString) => Either[DeserializationError, (A, ByteString)]): Either[DeserializationError, (Seq[A], ByteString)]
  11. def decodeString(bytes: ByteString): Either[DeserializationError, (String, ByteString)]

    Decode a java.lang.String from a length-prefixed com.google.protobuf.ByteString and return the remainder of the com.google.protobuf.ByteString.

    Decode a java.lang.String from a length-prefixed com.google.protobuf.ByteString and return the remainder of the com.google.protobuf.ByteString.

    Inverse to DeterministicEncoding.encodeString

  12. def decodeUVarInt(bytes: ByteString): Either[DeserializationError, (Long, ByteString)]

    Decodes a unsigned variable integer according to https://github.com/multiformats/unsigned-varint

  13. def encodeByte(b: Byte): ByteString

    Encode a scala.Byte into a com.google.protobuf.ByteString.

  14. def encodeBytes(b: ByteString): ByteString

    Encode a ByteString (of given length) into another ByteString

  15. def encodeEitherWith[L, R](either: Either[L, R])(encodeL: (L) => ByteString, encodeR: (R) => ByteString): ByteString

    Encode an scala.Either of com.google.protobuf.ByteStrings into a tagged com.google.protobuf.ByteString.

  16. def encodeInstant(instant: Instant): ByteString

    Encode an java.time.Instant into a com.google.protobuf.ByteString

  17. def encodeInt(i: Int): ByteString

    Encode an scala.Int into a fixed-length com.google.protobuf.ByteString in big-endian order.

  18. def encodeLong(l: Long): ByteString

    Encode a scala.Long into a fixed-length com.google.protobuf.ByteString in big-endian order.

  19. def encodeOptionWith[A](option: Option[A])(encode: (A) => ByteString): ByteString

    Encode an scala.Option into a tagged com.google.protobuf.ByteString, using the given encode function.

  20. def encodeParty(party: LfPartyId): ByteString

    Encode an LfPartyId into a com.google.protobuf.ByteString, using the underlying string

  21. def encodeSeqWith[A](seq: Seq[A])(encode: (A) => ByteString): ByteString

    Encode a scala.Seq into a com.google.protobuf.ByteString using the given encoding function, prefixing it with the length of the scala.Seq

  22. def encodeString(s: String): ByteString

    Encode a java.lang.String into a com.google.protobuf.ByteString, prefixing the string content with its length.

  23. def encodeTuple2With[A, B](pair: (A, B))(encodeA: (A) => ByteString, encodeB: (B) => ByteString): ByteString

    Encode a pair of com.google.protobuf.ByteStrings as an untagged com.google.protobuf.ByteString

  24. def encodeUVarInt(i: Long): ByteString

    Encodes the scala.Long into a unsigned variable integer according to https://github.com/multiformats/unsigned-varint

    Encodes the scala.Long into a unsigned variable integer according to https://github.com/multiformats/unsigned-varint

    Annotations
    @SuppressWarnings()
  25. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  27. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  28. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  29. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  30. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  31. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  32. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  33. def splitAt(len: Int, bytes: ByteString): Either[DeserializationError, (ByteString, ByteString)]

    Tests that the given com.google.protobuf.ByteString has at least len bytes and splits the com.google.protobuf.ByteString at len.

  34. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  35. def toString(): String
    Definition Classes
    AnyRef → Any
  36. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  37. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  38. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped