pub trait Decodable: Sized {
// Required method
fn decode(bf: &mut Bufferfish) -> Result<Self, BufferfishError>;
}
Expand description
Types implementing this trait are able to be decoded from a Bufferfish
.
Required Methods§
Sourcefn decode(bf: &mut Bufferfish) -> Result<Self, BufferfishError>
fn decode(bf: &mut Bufferfish) -> Result<Self, BufferfishError>
Decode the type from a Bufferfish
.
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.