pub struct Frame { /* private fields */ }
Implementations§
Source§impl Frame
impl Frame
Sourcepub fn from_data(pid: PID, data: &[u8]) -> Frame
pub fn from_data(pid: PID, data: &[u8]) -> Frame
Creates a LIN frame from the PID and data. Calculates and adds checksum accordingly
Sourcepub fn get_checksum(&self) -> u8
pub fn get_checksum(&self) -> u8
Get the checksum from the frame
Sourcepub fn get_data_with_checksum(&self) -> &[u8]
pub fn get_data_with_checksum(&self) -> &[u8]
Get the serialized bytes to write to the driver
Trait Implementations§
impl Eq for Frame
impl StructuralPartialEq for Frame
Auto Trait Implementations§
impl Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnwindSafe for Frame
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