pub struct Data { /* fields omitted */ }
Expand description
Payload of a CAN data frame.
Contains 0 to 8 Bytes of data.
Data
implements From<[u8; N]>
for all N
up to 8, which provides a convenient lossless
conversion from fixed-length arrays.
pub fn new(data: &[u8]) -> Option<Self>
[src]
Creates a data payload from a raw byte slice.
Returns None
if data
contains more than 8 Bytes (which is the maximum).
Data
can also be constructed from fixed-length arrays up to length 8 via From
/Into
.
pub const fn empty() -> Self
[src]
Creates an empty data payload containing 0 bytes.
Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Mutably dereferences the value.
Writes the defmt representation of self
to fmt
.
fn eq(&self, other: &Self) -> bool
[src]
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.