pub trait Decode: Encode + Sized {
type Ref<'a>;
// Required methods
fn decode(bytes: &[u8]) -> Result<Self>;
fn view(bytes: &[u8]) -> Result<Self::Ref<'_>>;
}Expand description
A type that can be read back out of a record.
Decode::Ref is the borrowed view: the form that reads out of the arena
without copying, which is Y29 and where G6’s point read budget lives. The
owned form is one call away for the code that does not care.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".