pub struct ClassicData { /* private fields */ }Expand description
Payload of a classic CAN data frame.
Contains 0 to 8 Bytes of data.
Implementations§
Source§impl ClassicData
impl ClassicData
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 FrameCreateError if data is more than 8 bytes (which is the maximum).
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§
Auto Trait Implementations§
impl Forget for ClassicData
impl Freeze for ClassicData
impl Move for ClassicData
impl RefUnwindSafe for ClassicData
impl Send for ClassicData
impl Sync for ClassicData
impl Unpin for ClassicData
impl UnsafeUnpin for ClassicData
impl UnwindSafe for ClassicData
Blanket Implementations§
impl<T, I> Binding<I, NoHandler<I>> for T
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