Enum CanIsoTpFrame

Source
pub enum CanIsoTpFrame {
    SingleFrame {
        data: Vec<u8>,
    },
    FirstFrame {
        length: u32,
        data: Vec<u8>,
    },
    ConsecutiveFrame {
        sequence: u8,
        data: Vec<u8>,
    },
    FlowControlFrame(FlowControlContext),
}
Expand description

ISO-TP frame define.

Variants§

§

SingleFrame

The ISO-TP single frame.

Fields

§data: Vec<u8>
§

FirstFrame

The ISO-TP first frame.

Fields

§length: u32
§data: Vec<u8>
§

ConsecutiveFrame

The ISO-TP consecutive frame.

Fields

§sequence: u8
§data: Vec<u8>
§

FlowControlFrame(FlowControlContext)

The ISO-TP flow control frame.

Trait Implementations§

Source§

impl Clone for CanIsoTpFrame

Source§

fn clone(&self) -> CanIsoTpFrame

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CanIsoTpFrame

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> From<&'a CanIsoTpFrame> for FrameType

Source§

fn from(value: &'a CanIsoTpFrame) -> Self

Converts to this type from the input type.
Source§

impl IsoTpFrame for CanIsoTpFrame

Source§

fn decode<T: AsRef<[u8]>>(data: T) -> Result<Self, Error>

Decode frame from origin data like 02 10 01. Read more
Source§

fn encode(self, padding: Option<u8>) -> Vec<u8>

Encode frame to data. Read more
Source§

fn from_data<T: AsRef<[u8]>>(data: T) -> Result<Vec<Self>, Error>

Encoding full multi-frame from original data. Read more
Source§

fn single_frame<T: AsRef<[u8]>>(data: T) -> Result<Self, Error>

New single frame from data. Read more
Source§

fn flow_ctrl_frame( state: FlowControlState, block_size: u8, st_min: u8, ) -> Result<Self, Error>

New flow control frame from data. Read more
Source§

fn default_flow_ctrl_frame() -> Self
where Self: Sized,

Source§

impl Send for CanIsoTpFrame

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.