[][src]Enum usbd_bulk_only_transport::TransferState

pub enum TransferState {
    NotTransferring {
        bytes_remaining: usize,
        empty: bool,
    },
    ReceivingDataFromHost {
        bytes_available: usize,
        full: bool,
        done: bool,
    },
    SendingDataToHost {
        bytes_remaining: usize,
        empty: bool,
    },
}

Variants

NotTransferring

There is no data transfer underway, we are either waiting for a command or about to send ZLP/CSW after a transfer has finished. We might be sending a CSW so bytes_remaining and empty use the same logic as SendingDataToHost

Fields of NotTransferring

bytes_remaining: usizeempty: bool
ReceivingDataFromHost

We are receving data from the host, bytes_available indicates how many bytes have been read into the buffer. full indicates we're out of buffer space and need the caller to process the data before we can do more work. done indicates data_residue has reached 0 and there won't be any more data read

Fields of ReceivingDataFromHost

bytes_available: usizefull: booldone: bool
SendingDataToHost

We are sending data to the host, bytes_remaining indicates how many bytes are still in the buffer. empty indicates the buffer is empty and we can't do any more work before the caller gives us more data

Fields of SendingDataToHost

bytes_remaining: usizeempty: bool

Trait Implementations

impl Clone for TransferState[src]

impl Copy for TransferState[src]

impl Debug for TransferState[src]

impl Eq for TransferState[src]

impl PartialEq<TransferState> for TransferState[src]

impl StructuralEq for TransferState[src]

impl StructuralPartialEq for TransferState[src]

Auto Trait Implementations

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> Same<T> for T[src]

type Output = T

Should always be Self

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.