Enum file_protocol::protocol::State [−][src]
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]
impl Clone for State
fn clone(&self) -> State
[src]
fn clone(&self) -> State
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for State
[src]
impl Debug for State
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for State
[src]
impl Eq for State
impl PartialEq for State
[src]
impl PartialEq for State