pub trait FormatDecoder<V> {
type DecodeError;
// Required method
fn decode(&mut self, reader: impl Read) -> Result<V, Self::DecodeError>;
}Expand description
A trait for decoding values of type V from a specific format
Required Associated Types§
Sourcetype DecodeError
type DecodeError
The error type that can occur during decoding
Required Methods§
Sourcefn decode(&mut self, reader: impl Read) -> Result<V, Self::DecodeError>
fn decode(&mut self, reader: impl Read) -> Result<V, Self::DecodeError>
Decodes a value from the provided reader
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.