[][src]Struct bxcan::Frame

pub struct Frame { /* fields omitted */ }

A CAN data or remote frame.

Implementations

impl Frame[src]

pub fn new_data(id: Id, data: Data) -> Self[src]

Creates a new data frame.

pub fn new_remote(id: Id, dlc: u8) -> Result<Frame, ()>[src]

Creates a new remote frame with configurable data length code (DLC).

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

Returns true if this frame is an extended frame.

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

Returns true if this frame is a standard frame.

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

Returns true if this frame is a remote frame.

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

Returns true if this frame is a data frame.

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

Returns the frame identifier.

pub fn priority(&self) -> FramePriority[src]

Returns the priority of this frame.

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

Returns the data length code (DLC) which is in the range 0..8.

For data frames the DLC value always matches the length of the data. Remote frames do not carry any data, yet the DLC can be greater than 0.

pub fn data(&self) -> Option<&Data>[src]

Returns the frame data (0..8 bytes in length) if this is a data frame.

If this is a remote frame, returns None.

Trait Implementations

impl Clone for Frame[src]

impl Debug for Frame[src]

impl Eq for Frame[src]

impl Format for Frame[src]

impl PartialEq<Frame> for Frame[src]

impl StructuralEq for Frame[src]

impl StructuralPartialEq for Frame[src]

Auto Trait Implementations

impl RefUnwindSafe for Frame

impl Send for Frame

impl Sync for Frame

impl Unpin for Frame

impl UnwindSafe for Frame

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> Same<T> for T

type Output = T

Should always be Self

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.