pub trait DecodeIn<A: Allocator>: Sized {
// Required method
fn decode_in(
decoder: &mut impl Decoder,
alloc: A,
) -> Result<Self, DecodeError>;
// Provided method
fn decode_trailing(
decoder: &mut impl Decoder,
alloc: A,
) -> Result<Option<Self>, DecodeError> { ... }
}Expand description
Deserializes a value from an OpenTimestamps-compatible byte stream.
Required Methods§
Sourcefn decode_in(decoder: &mut impl Decoder, alloc: A) -> Result<Self, DecodeError>
fn decode_in(decoder: &mut impl Decoder, alloc: A) -> Result<Self, DecodeError>
See Decode::decode for details.
Provided Methods§
Sourcefn decode_trailing(
decoder: &mut impl Decoder,
alloc: A,
) -> Result<Option<Self>, DecodeError>
fn decode_trailing( decoder: &mut impl Decoder, alloc: A, ) -> Result<Option<Self>, DecodeError>
See Decode::decode_trailing for details and caveats.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.