pub enum Transfer {
Download(Download),
Upload(Upload),
XyDownload(XyReceive),
XyUpload(XySend),
}Variants§
Implementations§
Source§impl Transfer
impl Transfer
Sourcepub fn feed(&mut self, data: &[u8], out: &mut Vec<u8>)
pub fn feed(&mut self, data: &[u8], out: &mut Vec<u8>)
Feed bytes received from the remote; bytes to send are appended to out.
Sourcepub fn tick(&mut self, now: Instant, out: &mut Vec<u8>)
pub fn tick(&mut self, now: Instant, out: &mut Vec<u8>)
Call periodically to drive timeouts and retries.
Sourcepub fn cancel(&mut self, out: &mut Vec<u8>)
pub fn cancel(&mut self, out: &mut Vec<u8>)
Abort the transfer, telling the other side to stop.
pub fn progress(&self) -> &Progress
pub fn is_finished(&self) -> bool
Sourcepub fn finish(self) -> (Outcome, Vec<u8>)
pub fn finish(self) -> (Outcome, Vec<u8>)
The result and any bytes received after the session ended, which belong to the terminal.
pub fn enqueue(&mut self, path: PathBuf) -> Result<()>
Auto Trait Implementations§
impl Freeze for Transfer
impl RefUnwindSafe for Transfer
impl Send for Transfer
impl Sync for Transfer
impl Unpin for Transfer
impl UnsafeUnpin for Transfer
impl UnwindSafe for Transfer
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