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§
Sourcefn from_header(header: Header, data: &[u8]) -> Result<Self, FrameCreateError>
fn from_header(header: Header, data: &[u8]) -> Result<Self, FrameCreateError>
Construct frame from header and payload
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.