pub trait ByteDecoder<'a> {
type InitError: IntoDeError + Debug;
type DecodeError: IntoDeError + Debug;
type Decoder: Iterator<Item = Result<u8, Self::DecodeError>>;
// Required method
fn from_str(s: &'a str) -> Result<Self::Decoder, Self::InitError>;
}Expand description
Provides an instance of string-to-byte decoder.
This is basically a type constructor used in places where value arguments are not accepted.
Such as the generic serialize.
Required Associated Types§
Sourcetype InitError: IntoDeError + Debug
type InitError: IntoDeError + Debug
Error returned when decoder can’t be created.
This is typically returned when string length is invalid.
Sourcetype DecodeError: IntoDeError + Debug
type DecodeError: IntoDeError + Debug
Error returned when decoding fails.
This is typically returned when the input string contains malformed chars.
Required Methods§
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.