pub struct AsyncReadWriteCompat<T: AsyncRead + AsyncWrite> { /* private fields */ }Expand description
Wrapper that makes AsyncRead and AsyncWrite traits from futures crate compatible with Hyper’s runtime.
Implementations§
Source§impl<T: AsyncRead + AsyncWrite> AsyncReadWriteCompat<T>
impl<T: AsyncRead + AsyncWrite> AsyncReadWriteCompat<T>
Sourcepub fn new(inner: T) -> Self
pub fn new(inner: T) -> Self
Creates new instance of wrapper by consuming provided async reader/writer.
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Returns consumed inner
Trait Implementations§
Source§impl<T: AsyncRead + AsyncWrite> Read for AsyncReadWriteCompat<T>
impl<T: AsyncRead + AsyncWrite> Read for AsyncReadWriteCompat<T>
Source§impl<T: AsyncRead + AsyncWrite> Write for AsyncReadWriteCompat<T>
impl<T: AsyncRead + AsyncWrite> Write for AsyncReadWriteCompat<T>
Source§fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8],
) -> Poll<Result<usize, Error>>
fn poll_write( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8], ) -> Poll<Result<usize, Error>>
Attempt to write bytes from
buf into the destination. Read moreSource§fn poll_flush(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Result<(), Error>>
fn poll_flush( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>
Attempts to flush the object. Read more
Source§fn poll_shutdown(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Result<(), Error>>
fn poll_shutdown( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>
Attempts to shut down this writer.
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: AsyncRead + AsyncWrite> Unpin for AsyncReadWriteCompat<T>where
PinnedFieldsOf<__AsyncReadWriteCompat<'pin, T>>: Unpin,
Auto Trait Implementations§
impl<T> Freeze for AsyncReadWriteCompat<T>where
T: Freeze,
impl<T> RefUnwindSafe for AsyncReadWriteCompat<T>where
T: RefUnwindSafe,
impl<T> Send for AsyncReadWriteCompat<T>where
T: Send,
impl<T> Sync for AsyncReadWriteCompat<T>where
T: Sync,
impl<T> UnwindSafe for AsyncReadWriteCompat<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