pub struct ConnectableIo<IO>(/* private fields */);
Available on crate feature
hyper-util
only.Expand description
This is an internal wrapper over an IO type that implements hyper::rt::Write and hyper::rt::Read that also implements Connection to achieve compatibility with hyper-util.
Trait Implementations§
Source§impl<IO: Write + Read + Send + Unpin> Connection for ConnectableIo<IO>
impl<IO: Write + Read + Send + Unpin> Connection for ConnectableIo<IO>
Source§impl<IO: Write + Read + Send + Unpin> Write for ConnectableIo<IO>
impl<IO: Write + Read + Send + Unpin> Write for ConnectableIo<IO>
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 moreAuto Trait Implementations§
impl<IO> Freeze for ConnectableIo<IO>where
IO: Freeze,
impl<IO> RefUnwindSafe for ConnectableIo<IO>where
IO: RefUnwindSafe,
impl<IO> Send for ConnectableIo<IO>where
IO: Send,
impl<IO> Sync for ConnectableIo<IO>where
IO: Sync,
impl<IO> Unpin for ConnectableIo<IO>where
IO: Unpin,
impl<IO> UnwindSafe for ConnectableIo<IO>where
IO: 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