pub struct FdFrame { /* private fields */ }
Expand description
Frame with up to 8 bytes of data payload as per Fd CAN
Implementations§
Source§impl FdFrame
impl FdFrame
Sourcepub fn new(
can_header: Header,
raw_data: &[u8],
) -> Result<Self, FrameCreateError>
pub fn new( can_header: Header, raw_data: &[u8], ) -> Result<Self, FrameCreateError>
Create a new CAN classic Frame
Sourcepub fn new_extended(
raw_id: u32,
raw_data: &[u8],
) -> Result<Self, FrameCreateError>
pub fn new_extended( raw_id: u32, raw_data: &[u8], ) -> Result<Self, FrameCreateError>
Create new extended frame
Sourcepub fn new_standard(
raw_id: u16,
raw_data: &[u8],
) -> Result<Self, FrameCreateError>
pub fn new_standard( raw_id: u16, raw_data: &[u8], ) -> Result<Self, FrameCreateError>
Create new standard frame
Sourcepub fn new_remote(
id: impl Into<Id>,
len: usize,
) -> Result<Self, FrameCreateError>
pub fn new_remote( id: impl Into<Id>, len: usize, ) -> Result<Self, FrameCreateError>
Create new remote frame
Trait Implementations§
Source§impl Frame for FdFrame
impl Frame for FdFrame
Source§fn new_remote(id: impl Into<Id>, len: usize) -> Option<Self>
fn new_remote(id: impl Into<Id>, len: usize) -> Option<Self>
Creates a new remote frame (RTR bit set). Read more
Source§fn is_extended(&self) -> bool
fn is_extended(&self) -> bool
Returns true if this frame is a extended frame.
Source§fn is_remote_frame(&self) -> bool
fn is_remote_frame(&self) -> bool
Returns true if this frame is a remote frame.
Source§fn dlc(&self) -> usize
fn dlc(&self) -> usize
Returns the data length code (DLC) which is in the range 0..8. Read more
Source§fn is_standard(&self) -> bool
fn is_standard(&self) -> bool
Returns true if this frame is a standard frame.
Source§fn is_data_frame(&self) -> bool
fn is_data_frame(&self) -> bool
Returns true if this frame is a data frame.
impl Copy for FdFrame
Auto Trait Implementations§
impl Freeze for FdFrame
impl RefUnwindSafe for FdFrame
impl Send for FdFrame
impl Sync for FdFrame
impl Unpin for FdFrame
impl UnwindSafe for FdFrame
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more