Trait TryDecode

Source
pub trait TryDecode<T> {
    type Error;

    // Required method
    fn try_decode<D: CANRead>(&self, data: &D) -> Result<T, Self::Error>;
}
Expand description

A trait modeling the failable decoding of data.

Required Associated Types§

Source

type Error

A type modeling the different possible failures of the decoding.

Required Methods§

Source

fn try_decode<D: CANRead>(&self, data: &D) -> Result<T, Self::Error>

Tries to decode a value.

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§