[][src]Enum file_protocol::protocol::State

pub enum State {
    Holding {
        count: u16,
        prev_state: Box<State>,
    },
    StartReceive {
        path: String,
    },
    Receiving {
        channel_id: u32,
        hash: String,
        path: String,
        mode: Option<u32>,
    },
    ReceivingDone {
        channel_id: u32,
        hash: String,
        path: String,
        mode: Option<u32>,
    },
    Transmitting,
    TransmittingDone,
    Done,
}

Current state of the file protocol transaction

Variants

Holding

Neutral state, neither transmitting nor receiving

Fields of Holding

count: u16

Number of consecutive times the holding state has been hit

prev_state: Box<State>

Previous state to return to once we exit the holding state

StartReceive

Preparing to receive file chunks

Fields of StartReceive

path: String

Destination file path

Receiving

Currently receiving a file

Fields of Receiving

channel_id: u32

Transaction identifier

hash: String

File hash

path: String

Destination file path

mode: Option<u32>

File mode

ReceivingDone

All file chunks have been received

Fields of ReceivingDone

channel_id: u32

Transaction identifier

hash: String

File hash

path: String

Destination file path

mode: Option<u32>

File mode

Transmitting

Currenty transmitting a file

TransmittingDone

All file chunks have been transmitted

Done

Finished transmitting/receiving, thread or process may end

Trait Implementations

impl Clone for State[src]

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

Performs copy-assignment from source. Read more

impl Eq for State[src]

impl PartialEq<State> for State[src]

impl Debug for State[src]

Auto Trait Implementations

impl Send for State

impl Sync for State

Blanket Implementations

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

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

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

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