pub struct SftpReceiver { /* private fields */ }
Implementations§
Source§impl SftpReceiver
impl SftpReceiver
pub fn new<T: AsRef<str>>(host: T, user: T) -> Self
pub fn on_event<T, Fut>(self, handler: T) -> Self
Sourcepub fn password<T: AsRef<str>>(self, password: T) -> Self
pub fn password<T: AsRef<str>>(self, password: T) -> Self
Sets the password for authentication.
Sourcepub fn private_key<T: AsRef<Path>, S: AsRef<str>>(
self,
key_path: T,
passphrase: Option<S>,
) -> Self
pub fn private_key<T: AsRef<Path>, S: AsRef<str>>( self, key_path: T, passphrase: Option<S>, ) -> Self
Sets the private key path and passphrase for authentication.
Sourcepub fn remote_path<T: AsRef<Path>>(self, remote_path: T) -> Self
pub fn remote_path<T: AsRef<Path>>(self, remote_path: T) -> Self
Sets the remote directory for the user on the sftp server.
Sourcepub fn delete_after(self, delete_after: bool) -> Self
pub fn delete_after(self, delete_after: bool) -> Self
Delete the remote file in sftp after successfully downloading it.
Auto Trait Implementations§
impl Freeze for SftpReceiver
impl !RefUnwindSafe for SftpReceiver
impl Send for SftpReceiver
impl Sync for SftpReceiver
impl Unpin for SftpReceiver
impl !UnwindSafe for SftpReceiver
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