#[non_exhaustive]pub enum Event {
FileStart {
name: Vec<u8>,
},
Data(Vec<u8>),
Progress {
sent: u64,
total: u64,
},
FileEnd {
discarded: bool,
},
ServerText(Vec<u8>),
Error(Error),
Done,
}Expand description
Something that happened during a transaction.
Variants (Non-exhaustive)§
This enum is marked as 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.
FileStart
A file starts. Receive: the name from the F packet. Send: the name from the ACK to F if non-empty, else the name we sent.
Data(Vec<u8>)
Decoded data of one received D packet (file transfer only, not X text).
Progress
Send progress after each acknowledged D packet.
Fields
FileEnd
Z received or acknowledged.
ServerText(Vec<u8>)
Reply text to Host/Directory.
Error(Error)
Terminal failure; the client is idle.
Done
Terminal success. The client is idle, or lingers after the final ACK
of a receive (Config::linger).
Trait Implementations§
impl Eq for Event
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Forget for Event
impl Freeze for Event
impl Move for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more