Struct socketcan_hal::CanFrame
source · [−]#[repr(C)]pub struct CanFrame { /* private fields */ }
Expand description
CanFrame
Uses the same memory layout as the underlying kernel struct for performance reasons.
Implementations
Trait Implementations
sourceimpl Frame for CanFrame
impl Frame for CanFrame
sourcefn is_extended(&self) -> bool
fn is_extended(&self) -> bool
Check if frame uses 29 bit extended frame format
sourcefn is_remote_frame(&self) -> bool
fn is_remote_frame(&self) -> bool
Check if frame is a remote transmission request
sourcefn data(&self) -> &[u8]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
fn data(&self) -> &[u8]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
A slice into the actual data. Slice will always be <= 8 bytes in length
sourcefn new_remote(id: impl Into<Id>, dlc: usize) -> Option<Self>
fn new_remote(id: impl Into<Id>, dlc: usize) -> Option<Self>
Creates a new remote frame (RTR bit set). Read more
sourcefn is_standard(&self) -> bool
fn is_standard(&self) -> bool
Returns true if this frame is a standard frame.
sourcefn is_data_frame(&self) -> bool
fn is_data_frame(&self) -> bool
Returns true if this frame is a data frame.
impl Copy for CanFrame
Auto Trait Implementations
impl RefUnwindSafe for CanFrame
impl Send for CanFrame
impl Sync for CanFrame
impl Unpin for CanFrame
impl UnwindSafe for CanFrame
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more