trait MemoizedEvidenceWithFailure[SerializationError] extends HasCryptographicEvidence with NoCopy
Effectively immutable HasCryptographicEvidence classes can mix in this trait to implement the memoization logic.
Use this class if serialization may fail. This mix-in checks whenever an object is constructed that
either a serialization is given or that serialization will succeed.
It also ensures that no copy
method is generated for case classes with this mixin.
Make sure that fromByteString(byteString).deserializedFrom
equals Some(byteString)
.
Make sure that every public constructor and apply method yields an instance with deserializedFrom == None
.
- SerializationError
The type of serialization errors
- Exceptions thrown
SerializationCheckFailed
if the serialization fails- See also
MemoizedEvidence if serialization always succeeds.
- Alphabetic
- By Inheritance
- MemoizedEvidenceWithFailure
- NoCopy
- HasCryptographicEvidence
- HasVersionedToByteString
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def deserializedFrom: Option[ByteString]
Returns the com.google.protobuf.ByteString from which this object has been deserialized, if any.
Returns the com.google.protobuf.ByteString from which this object has been deserialized, if any. If defined, getCryptographicEvidence will use this as the serialization.
- Attributes
- protected[this]
- abstract def toByteStringChecked: Either[SerializationError, ByteString]
Computes the serialization of the object as a com.google.protobuf.ByteString or produces a
SerializationError
if serialization fails.Computes the serialization of the object as a com.google.protobuf.ByteString or produces a
SerializationError
if serialization fails.Must meet the contract of getCryptographicEvidence except that different com.google.protobuf.ByteStrings may be returned when called several times and it may fail at any time.
- Attributes
- protected[this]
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def copy(nothing: Nothing): Nothing
- Attributes
- protected
- Definition Classes
- NoCopy
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final val getCryptographicEvidence: ByteString
Returns the serialization of the object into a com.google.protobuf.ByteString.
Returns the serialization of the object into a com.google.protobuf.ByteString. In particular, every instance
i
of this trait must equalfromByteString(i.toByteString)
.This method must yield the same result if it is invoked several times.
- Definition Classes
- MemoizedEvidenceWithFailure → HasCryptographicEvidence
- Annotations
- @throws(scala.this.throws.<init>$default$1[com.digitalasset.canton.serialization.SerializationCheckFailed[SerializationError]])
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toByteString(version: ProtocolVersion): ByteString
Returns the serialization of the object into a com.google.protobuf.ByteString.
Returns the serialization of the object into a com.google.protobuf.ByteString. This method may yield different results if it is invoked several times.
- Definition Classes
- HasCryptographicEvidence → HasVersionedToByteString
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])