[][src]Struct stm32f3xx_hal_v2::can::CanFrame

pub struct CanFrame { /* fields omitted */ }

A CAN frame consisting of a destination ID and up to 8 bytes of data.

Currently, we always allocate a fixed size array for each frame regardless of actual size, but this could be improved in the future using const-generics.

Implementations

impl CanFrame[src]

pub fn new_data(id: CanId, data: &[u8]) -> CanFrame[src]

Create a new Can Frame

src content is copied into internal buffer and handled internally.

Panics

This function will panic if length of data is greater than 8

pub fn new_remote(id: CanId, dlc: usize) -> CanFrame[src]

Crate a new remote Can Frame

Panics

This function will panic if dlc is not inside the vliad range 0..=8.

Trait Implementations

impl Clone for CanFrame[src]

impl Debug for CanFrame[src]

impl Eq for CanFrame[src]

impl Frame for CanFrame[src]

type Id = CanId

The Id type of this Frame

impl PartialEq<CanFrame> for CanFrame[src]

impl StructuralEq for CanFrame[src]

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

type Output = T

Should always be Self

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.