Skip to main content

CanDecoder

Trait CanDecoder 

Source
pub trait CanDecoder {
    // Required method
    fn decode(&self, buf: &[u8]) -> Option<CanFrame>;
}
Expand description

Decodes a byte buffer into a CAN frame.

Required Methods§

Source

fn decode(&self, buf: &[u8]) -> Option<CanFrame>

Try to decode a CAN frame from buf. Returns Some(frame) on success, None if the buffer does not contain a complete frame.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§