[][src]Enum mini_slcan::write::Response

#[non_exhaustive]pub enum Response {
    Error,
    Ack,
    TxAck,
    ExtTxAck,
    Status(Status),
    Version {
        hardware_version: u8,
        software_version: u8,
    },
    Serial(SerialNumber),
}

A response to a Command.

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

General error response (ASCII BELL).

Ack

Generic acknowledgement of a command (CR).

TxAck

Standard CAN frame enqueued for transmission.

ExtTxAck

Extended CAN frame enqueued for transmission.

Status(Status)

Status flags response.

Version

Response to the ReadVersion command.

Fields of Version

hardware_version: u8software_version: u8
Serial(SerialNumber)

Response to the ReadSerial command.

Implementations

impl Response[src]

pub fn encode<'a>(&self, buf: &'a mut ResponseBuf) -> Result<&'a [u8], Error>[src]

Trait Implementations

impl Clone for Response[src]

impl Debug for Response[src]

impl Eq for Response[src]

impl Format for Response[src]

impl PartialEq<Response> for Response[src]

impl StructuralEq for Response[src]

impl StructuralPartialEq for Response[src]

Auto Trait Implementations

impl Send for Response

impl Sync for Response

impl Unpin for Response

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.