pub struct HyperIo<T> { /* private fields */ }
Expand description
A wrapper that implements IO traits for an inner type that implements hyper’s IO traits, or vice versa (implements hyper’s IO traits for a type that implements IO traits).
Implementations§
Trait Implementations§
Source§impl<T> AsyncRead for HyperIo<T>where
T: Read,
impl<T> AsyncRead for HyperIo<T>where
T: Read,
Source§impl<T> AsyncWrite for HyperIo<T>where
T: Write,
impl<T> AsyncWrite for HyperIo<T>where
T: Write,
Source§fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8],
) -> Poll<Result<usize>>
fn poll_write( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8], ) -> Poll<Result<usize>>
Attempt to write bytes from
buf
into the object. Read moreSource§fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>
Attempt to flush the object, ensuring that any buffered data reach
their destination. Read more
Source§impl<T> Write for HyperIo<T>where
T: AsyncWrite,
impl<T> Write for HyperIo<T>where
T: AsyncWrite,
Source§fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8],
) -> Poll<Result<usize>>
fn poll_write( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8], ) -> Poll<Result<usize>>
Attempt to write bytes from
buf
into the destination. Read moreSource§fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>
Attempts to flush the object. Read more
Source§fn poll_shutdown(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>
fn poll_shutdown(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>
Attempts to shut down this writer.
Source§fn poll_write_vectored(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>],
) -> Poll<Result<usize>>
fn poll_write_vectored( self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>], ) -> Poll<Result<usize>>
Like
poll_write
, except that it writes from a slice of buffers.Source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
Returns whether this writer has an efficient
poll_write_vectored
implementation. Read moreimpl<'__pin, T> Unpin for HyperIo<T>where
PinnedFieldsOf<__Origin<'__pin, T>>: Unpin,
Auto Trait Implementations§
impl<T> Freeze for HyperIo<T>where
T: Freeze,
impl<T> RefUnwindSafe for HyperIo<T>where
T: RefUnwindSafe,
impl<T> Send for HyperIo<T>where
T: Send,
impl<T> Sync for HyperIo<T>where
T: Sync,
impl<T> UnwindSafe for HyperIo<T>where
T: UnwindSafe,
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