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§
Object Safety§
This trait is not object safe.