Packages

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 checkBytePrefix(b: Byte, bytes: ByteString): Either[DeserializationError, ByteString]

    Tests that the given com.google.protobuf.ByteString starts with the given byte and drops it.

  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  7. def decodeBytes(bytes: ByteString): Either[DeserializationError, (ByteString, ByteString)]

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

  8. 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.

  9. 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

  10. 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.

  11. def decodeSeqWith[A](bytes: ByteString)(decode: (ByteString) => Either[DeserializationError, (A, ByteString)]): Either[DeserializationError, (Seq[A], ByteString)]
  12. 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

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

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

  14. def encodeByte(b: Byte): ByteString

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

  15. def encodeBytes(b: ByteString): ByteString

    Encode a ByteString (of given length) into another ByteString

  16. 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.

  17. def encodeInstant(instant: Instant): ByteString

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

  18. def encodeInt(i: Int): ByteString

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

  19. def encodeLong(l: Long): ByteString

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

  20. 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.

  21. def encodeParty(party: LfPartyId): ByteString

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

  22. 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

  23. def encodeString(s: String): ByteString

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

  24. 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

  25. 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()
  26. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  28. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  29. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  30. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  31. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  32. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  33. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  34. 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.

  35. def strictDeserializer[T](deserialize: (ByteString) => Either[DeserializationError, (T, ByteString)]): (ByteString) => Either[DeserializationError, T]

    Wrapper to deserialize strictly, returning an error if there are trailing bytes

  36. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  37. def toString(): String
    Definition Classes
    AnyRef → Any
  38. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  39. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  40. 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

Inherited from AnyRef

Inherited from Any

Ungrouped