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,
}
Expand description

Current state of the file protocol transaction

Variants

Holding

Fields

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

Neutral state, neither transmitting nor receiving

StartReceive

Fields

path: String

Destination file path

Preparing to receive file chunks

Receiving

Fields

channel_id: u32

Transaction identifier

hash: String

File hash

path: String

Destination file path

mode: Option<u32>

File mode

Currently receiving a file

ReceivingDone

Fields

channel_id: u32

Transaction identifier

hash: String

File hash

path: String

Destination file path

mode: Option<u32>

File mode

All file chunks have been received

Transmitting

Currenty transmitting a file

TransmittingDone

All file chunks have been transmitted

Done

Finished transmitting/receiving, thread or process may end

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.