pub unsafe trait Decode<D>: Wire + Constrainedwhere
    D: ?Sized,{
    // Required method
    fn decode(
        slot: Slot<'_, Self>,
        decoder: &mut D,
        constraint: Self::Constraint,
    ) -> Result<(), DecodeError>;
}Expand description
Decodes a value from the given slot.
§Safety
If decode returns Ok, then the provided slot will contain a valid decoded value after the
decoder is committed.
Required Methods§
Sourcefn decode(
    slot: Slot<'_, Self>,
    decoder: &mut D,
    constraint: Self::Constraint,
) -> Result<(), DecodeError>
 
fn decode( slot: Slot<'_, Self>, decoder: &mut D, constraint: Self::Constraint, ) -> Result<(), DecodeError>
Decodes a value into a slot using a decoder.
If decoding succeeds, slot will contain a valid decoded value after the decoder is
committed. If decoding fails, an error will be returned.
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.