[][src]Struct tokio_socketcan_bcm::CANFrame

#[repr(C)]pub struct CANFrame { /* fields omitted */ }

CANFrame

Uses the same memory layout as the underlying kernel struct for performance reasons.

Implementations

impl CANFrame[src]

pub fn new(
    id: u32,
    data: &[u8],
    rtr: bool,
    err: bool
) -> Result<CANFrame, ConstructionError>
[src]

pub fn id(&self) -> u32[src]

Return the actual CAN ID (without EFF/RTR/ERR flags)

pub fn err(&self) -> u32[src]

Return the error message

pub fn is_extended(&self) -> bool[src]

Check if frame uses 29 bit extended frame format

pub fn is_error(&self) -> bool[src]

Check if frame is an error message

pub fn is_rtr(&self) -> bool[src]

Check if frame is a remote transmission request

pub fn data(&self) -> &[u8][src]

A slice into the actual data. Slice will always be <= 8 bytes in length

pub fn error(&self) -> Result<CANError, CANErrorDecodingFailure>[src]

Trait Implementations

impl Clone for CANFrame[src]

impl Copy for CANFrame[src]

impl Debug for CANFrame[src]

impl UpperHex for CANFrame[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err