Trait CanDecode

Source
pub trait CanDecode<Strategy, Value>: HasEncodedType + HasErrorType {
    // Required method
    fn decode(&self, encoded: &Self::Encoded) -> Result<Value, Self::Error>;
}

Required Methods§

Source

fn decode(&self, encoded: &Self::Encoded) -> Result<Value, Self::Error>

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.

Implementors§

Source§

impl<Encoding, Strategy, Value> CanDecode<Strategy, Value> for Encoding
where Encoding: HasEncodedType + HasErrorType + HasComponents, Encoding::Components: Decoder<Encoding, Strategy, Value>,