Struct can_socket::CanFrame
source · pub struct CanFrame { /* private fields */ }
Implementations§
source§impl CanFrame
impl CanFrame
pub fn new( id: impl Into<CanId>, data: &[u8], data_length_code: Option<u8> ) -> Result<Self>
sourcepub fn new_rtr(id: impl Into<CanId>, data_len: u8) -> Result<Self>
pub fn new_rtr(id: impl Into<CanId>, data_len: u8) -> Result<Self>
Create a new RTR (request-to-read) frame.
pub fn id(&self) -> CanId
pub fn is_rtr(&self) -> bool
pub fn data(&self) -> &[u8] ⓘ
pub fn data_length_code(&self) -> Option<u8>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CanFrame
impl RefUnwindSafe for CanFrame
impl Send for CanFrame
impl Sync for CanFrame
impl Unpin for CanFrame
impl UnwindSafe for CanFrame
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