#[repr(C)]pub struct CANFrame { /* private fields */ }
Expand description
CANFrame
Uses the same memory layout as the underlying kernel struct for performance reasons.
Implementations§
Source§impl CANFrame
impl CANFrame
pub fn new( id: u32, data: &[u8], rtr: bool, err: bool, ) -> Result<CANFrame, ConstructionError>
Sourcepub fn is_extended(&self) -> bool
pub fn is_extended(&self) -> bool
Check if frame uses 29 bit extended frame format
Sourcepub fn data(&self) -> &[u8] ⓘ
pub fn data(&self) -> &[u8] ⓘ
A slice into the actual data. Slice will always be <= 8 bytes in length
pub fn error(&self) -> Result<CANError, CANErrorDecodingFailure>
Trait Implementations§
Source§impl Sink<CANFrame> for CANSocket
impl Sink<CANFrame> for CANSocket
Source§fn poll_ready(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>>
fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>
Attempts to prepare the
Sink
to receive a value. Read moreSource§fn poll_flush(
self: Pin<&mut Self>,
_cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>>
fn poll_flush( self: Pin<&mut Self>, _cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>
Flush any remaining output from this sink. Read more
impl Copy for CANFrame
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