[−][src]Struct bxcan::Data
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.
Implementations
impl Data
[src]
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.
Trait Implementations
impl AsMut<[u8]> for Data
[src]
impl AsRef<[u8]> for Data
[src]
impl Clone for Data
[src]
impl Copy for Data
[src]
impl Debug for Data
[src]
impl Deref for Data
[src]
impl DerefMut for Data
[src]
impl Eq for Data
[src]
impl Format for Data
[src]
impl From<[u8; 0]> for Data
[src]
impl From<[u8; 1]> for Data
[src]
impl From<[u8; 2]> for Data
[src]
impl From<[u8; 3]> for Data
[src]
impl From<[u8; 4]> for Data
[src]
impl From<[u8; 5]> for Data
[src]
impl From<[u8; 6]> for Data
[src]
impl From<[u8; 7]> for Data
[src]
impl From<[u8; 8]> for Data
[src]
impl PartialEq<Data> for Data
[src]
Auto Trait Implementations
impl RefUnwindSafe for Data
impl Send for Data
impl Sync for Data
impl Unpin for Data
impl UnwindSafe for Data
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,