[][src]Enum mini_slcan::read::Command

#[non_exhaustive]pub enum Command {
    SetupWithBitrate {
        bitrate: Bitrate,
    },
    Open,
    Close,
    TxStandard {
        identifier: Identifier,
        frame: CanFrame,
    },
    TxExt {
        identifier: ExtIdentifier,
        frame: CanFrame,
    },
    TxStandardRtr {
        identifier: Identifier,
        len: u8,
    },
    TxExtRtr {
        identifier: ExtIdentifier,
        len: u8,
    },
    ReadStatus,
    ReadVersion,
    ReadSerial,
    SetRxTimestamp {
        timestamp: bool,
    },
}

A command sent from the host to the SLCAN device.

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
SetupWithBitrate

Fields of SetupWithBitrate

bitrate: Bitrate
Open
Close
TxStandard

Fields of TxStandard

identifier: Identifierframe: CanFrame
TxExt

Transmit an extended CAN frame.

Fields of TxExt

identifier: ExtIdentifierframe: CanFrame
TxStandardRtr

Fields of TxStandardRtr

identifier: Identifierlen: u8
TxExtRtr

Fields of TxExtRtr

identifier: ExtIdentifierlen: u8
ReadStatus
ReadVersion
ReadSerial
SetRxTimestamp

Fields of SetRxTimestamp

timestamp: bool

Implementations

impl Command[src]

pub const MAX_ENCODED_LEN: usize[src]

pub fn decode(input: &[u8]) -> Result<Self, Error>[src]

Decodes a command from an input string. The input must contain the terminating CR character (ASCII 13).

Trait Implementations

impl Debug for Command[src]

impl Eq for Command[src]

impl Format for Command[src]

impl PartialEq<Command> for Command[src]

impl StructuralEq for Command[src]

impl StructuralPartialEq for Command[src]

Auto Trait Implementations

impl RefUnwindSafe for Command

impl Send for Command

impl Sync for Command

impl Unpin for Command

impl UnwindSafe for Command

Blanket Implementations

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

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

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

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

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

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> 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.