pub struct TokioOutput<T> { /* private fields */ }Expand description
Implementations§
Source§impl<T> TokioOutput<T>
impl<T> TokioOutput<T>
Sourcepub const fn get_mut(&mut self) -> &mut T
pub const fn get_mut(&mut self) -> &mut T
Returns a mutable reference to the wrapped writer.
§Returns
Returns the wrapped Tokio writer with mutable access.
Sourcepub fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut T>
pub fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut T>
Projects a pinned adapter to its pinned wrapped writer.
§Returns
Returns a pinned mutable reference to the wrapped writer without moving it.
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Trait Implementations§
Source§impl<T> AsyncClose for TokioOutput<T>where
T: AsyncWrite,
impl<T> AsyncClose for TokioOutput<T>where
T: AsyncWrite,
Source§fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>
fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>
Polls closing through the wrapped Tokio writer.
§Parameters
cx: Task context used to register a wake-up.
§Returns
Returns Poll::Pending while closing is incomplete, otherwise a
ready success result.
§Errors
Returns an I/O error reported by the wrapped writer. Invalid
asynchronous error kinds are normalized to
std::io::ErrorKind::InvalidData.
Source§fn close_async(&mut self) -> CloseFuture<'_, Self> ⓘ
fn close_async(&mut self) -> CloseFuture<'_, Self> ⓘ
Source§impl<T> AsyncOutput for TokioOutput<T>where
T: AsyncWrite,
impl<T> AsyncOutput for TokioOutput<T>where
T: AsyncWrite,
Source§unsafe fn poll_write_unchecked(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
input: &[u8],
index: usize,
count: usize,
) -> Poll<Result<usize>>
unsafe fn poll_write_unchecked( self: Pin<&mut Self>, cx: &mut Context<'_>, input: &[u8], index: usize, count: usize, ) -> Poll<Result<usize>>
Polls an indexed write through the wrapped Tokio writer.
A zero-length request completes immediately without polling inner.
§Parameters
cx: Task context used to register a wake-up.input: Source byte slice.index: Starting source index.count: Maximum number of bytes to write.
§Returns
Returns Poll::Pending when the writer is not ready. A ready result
contains the number of bytes accepted.
§Errors
Returns an I/O error reported by the wrapped writer. Invalid
asynchronous error kinds are normalized to
std::io::ErrorKind::InvalidData.
§Panics
Panics in debug builds if the requested input range does not fit.
§Safety
The range index..index + count must be valid for input.
Source§fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>
Polls flushing through the wrapped Tokio writer.
§Parameters
cx: Task context used to register a wake-up.
§Returns
Returns Poll::Pending while flushing is incomplete, otherwise a
ready success result.
§Errors
Returns an I/O error reported by the wrapped writer. Invalid
asynchronous error kinds are normalized to
std::io::ErrorKind::InvalidData.