pub struct ScpBroker(/* private fields */);
Implementations§
source§impl ScpBroker
impl ScpBroker
sourcepub fn start_download<P: AsRef<OsStr> + ?Sized>(
&mut self,
local_path: &P,
remote_path: &P
) -> SshResult<()>
pub fn start_download<P: AsRef<OsStr> + ?Sized>( &mut self, local_path: &P, remote_path: &P ) -> SshResult<()>
download a file from remote path to local path
this method is equivalent to shell command
scp -P port user@ip:remote_path local_path
This method is running in the backend
that needs end_download
to explicitly end it
sourcepub fn end_download(self) -> SshResult<()>
pub fn end_download(self) -> SshResult<()>
explicitly end the download routine and sync the filesystem
this method will block until all donwload tasks end
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for ScpBroker
impl Send for ScpBroker
impl !Sync for ScpBroker
impl Unpin for ScpBroker
impl UnwindSafe for ScpBroker
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