pub unsafe trait Decode<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
must now contain a valid
value of the implementing type.
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.