Struct openssh_sftp_client::Sftp
source · [−]pub struct Sftp { /* private fields */ }
Expand description
A file-oriented channel to a remote host.
Implementations
sourceimpl Sftp
impl Sftp
sourcepub async fn new<W: AsyncWrite + Send + 'static, R: AsyncRead + Send + 'static>(
stdin: W,
stdout: R,
options: SftpOptions
) -> Result<Self, Error>
pub async fn new<W: AsyncWrite + Send + 'static, R: AsyncRead + Send + 'static>(
stdin: W,
stdout: R,
options: SftpOptions
) -> Result<Self, Error>
Create Sftp
.
sourcepub fn options(&self) -> OpenOptions<'_>
pub fn options(&self) -> OpenOptions<'_>
Return a new OpenOptions
object.
sourcepub async fn create(&self, path: impl AsRef<Path>) -> Result<File<'_>, Error>
pub async fn create(&self, path: impl AsRef<Path>) -> Result<File<'_>, Error>
Opens a file in write-only mode.
This function will create a file if it does not exist, and will truncate it if it does.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Sftp
impl Send for Sftp
impl Sync for Sftp
impl Unpin for Sftp
impl !UnwindSafe for Sftp
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more