pub trait Decode: Sized {
// Required method
fn decode(decoder: &mut Decoder<'_>) -> Result<Self>;
// Provided method
fn decode_sized(decoder: &mut Decoder<'_>, _size: usize) -> Result<Self> { ... }
}
Required Methods§
Provided Methods§
fn decode_sized(decoder: &mut Decoder<'_>, _size: usize) -> Result<Self>
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.
Implementations on Foreign Types§
Source§impl Decode for String
String based on the ASCII characters in the decoder, can be length 0-infinite.
impl Decode for String
String based on the ASCII characters in the decoder, can be length 0-infinite.