Trait openssh_sftp_client::Writer
source · [−]pub trait Writer: AsyncWrite + Unpin {
const MAX_ATOMIC_WRITE_LEN: usize;
fn poll_write_vectored_atomic(
&self,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<()>>;
fn poll_flush_buffers(
&mut self,
cx: &mut Context<'_>,
buffers: &mut Buffers<'_>
) -> Poll<Result<()>> { ... }
fn io_slices_buffer_len() -> NonZeroUsize { ... }
}
Expand description
trait for Writer that can be used as output for sftp client.
Associated Constants
const MAX_ATOMIC_WRITE_LEN: usize
const MAX_ATOMIC_WRITE_LEN: usize
The maximum length of which poll_write_vectored_atomic
can accept.
Required methods
Provided methods
Flush the buffers
.
It is cancellable and can be restarted with another thread.
Return the length of IoSlice
buffer.
Return 0
if your poll_flush_buffers
is completely zero-copy
by using Buffers::drain_bytes
API.