embassy-stm32

Crates

git

Versions

stm32f437ii

Flavors

embassy_stm32::can::frame

Trait CanHeader

Source
pub trait CanHeader: Sized {
    // Required methods
    fn from_header(
        header: Header,
        data: &[u8],
    ) -> Result<Self, FrameCreateError>;
    fn header(&self) -> &Header;
}
Expand description

Trait for FDCAN frame types, providing ability to construct from a Header and to retrieve the Header from a frame

Required Methods§

Source

fn from_header(header: Header, data: &[u8]) -> Result<Self, FrameCreateError>

Construct frame from header and payload

Source

fn header(&self) -> &Header

Get this frame’s header struct

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§