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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)