Struct embassy_stm32::can::frame::FdData
source ยท pub struct FdData { /* private fields */ }
Expand description
Payload of a (FD)CAN data frame.
Contains 0 to 64 Bytes of data.
Implementationsยง
sourceยงimpl FdData
impl FdData
sourcepub fn new(data: &[u8]) -> Result<Self, FrameCreateError>
pub fn new(data: &[u8]) -> Result<Self, FrameCreateError>
Creates a data payload from a raw byte slice.
Returns None
if data
is more than 64 bytes (which is the maximum) or
cannot be represented with an FDCAN DLC.
sourcepub const fn is_valid_len(len: usize) -> bool
pub const fn is_valid_len(len: usize) -> bool
Checks if the length can be encoded in FDCAN DLC field.
Trait Implementationsยง
impl Copy for FdData
Auto Trait Implementationsยง
impl Freeze for FdData
impl RefUnwindSafe for FdData
impl Send for FdData
impl Sync for FdData
impl Unpin for FdData
impl UnwindSafe for FdData
Blanket Implementationsยง
sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
sourceยงunsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
๐ฌThis is a nightly-only experimental API. (
clone_to_uninit
)