pub trait Decodable: Sized {
// Required method
fn decode(reader: &mut TdfReader<'_>) -> DecodeResult<Self>;
}
Expand description
Trait for something that can be decoded from a TdfReader
Required Methods§
sourcefn decode(reader: &mut TdfReader<'_>) -> DecodeResult<Self>
fn decode(reader: &mut TdfReader<'_>) -> DecodeResult<Self>
Function for implementing decoding of Self from the provided Reader. Will return None if self cannot be decoded
reader
The reader to decode from