Trait Decode
pub unsafe trait Decode<D>where
D: ?Sized,{
// Required method
fn decode(slot: Slot<'_, Self>, decoder: &mut D) -> Result<(), DecodeError>;
}
Expand description
Decodes a value from the given slot.
§Safety
If decode
returns Ok
, then the provided slot
will contain a valid Self
after the
decoder is committed.
Required Methods§
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.