[][src]Struct lin_bus::frame::PID

#[repr(transparent)]
pub struct PID(_);

Protected ID which is a 6 bit ID with two parity bits

Methods

impl PID[src]

pub fn from_id(id: u8) -> PID[src]

Calculate the PID from an ID. P0 = ID0 ⊕ ID1 ⊕ ID2 ⊕ ID4 P1 = ¬(ID1 ⊕ ID3 ⊕ ID4 ⊕ ID5)

pub const fn get(self) -> u8[src]

Return the contained PID

pub const fn get_id(self) -> u8[src]

Return the contained ID

pub const fn uses_classic_checksum(self) -> bool[src]

Return if the associated frame uses the classic checksum (diagnostic IDs 60 and 61 or special use IDs 62, 63)

Trait Implementations

impl Debug for PID[src]

impl PartialEq<PID> for PID[src]

impl Eq for PID[src]

impl Copy for PID[src]

impl Clone for PID[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Unpin for PID

impl Sync for PID

impl Send for PID

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]