[−][src]Struct stm32f3xx_hal_v2::can::CanFrame
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]
pub fn clone(&self) -> CanFrame
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[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
pub fn is_remote_frame(&self) -> bool
[src]
pub fn is_data_frame(&self) -> bool
[src]
pub fn id(&self) -> <CanFrame as Frame>::Id
[src]
pub fn data(&self) -> Option<&[u8]>
[src]
pub fn is_base_id_frame(&self) -> bool
[src]
pub fn is_extended_id_frame(&self) -> bool
[src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,