[−][src]Struct duplexify::Duplex
Combine a reader + writer into a duplex of Read
+ Write
.
Methods
impl<R, W> Duplex<R, W>
[src]
pub fn new(reader: R, writer: W) -> Self
[src]
Create a new instance.
pub fn into_inner(self) -> (R, W)
[src]
Decomposes a duplex into its components.
Trait Implementations
impl<R: BufRead, W> AsyncBufRead for Duplex<R, W>
[src]
fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context) -> Poll<Result<&[u8]>>
[src]
fn consume(self: Pin<&mut Self>, amt: usize)
[src]
impl<R: Read, W> AsyncRead for Duplex<R, W>
[src]
fn poll_read(
self: Pin<&mut Self>,
cx: &mut Context,
buf: &mut [u8]
) -> Poll<Result<usize>>
[src]
self: Pin<&mut Self>,
cx: &mut Context,
buf: &mut [u8]
) -> Poll<Result<usize>>
fn poll_read_vectored(
self: Pin<&mut Self>,
cx: &mut Context,
bufs: &mut [IoSliceMut]
) -> Poll<Result<usize, Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context,
bufs: &mut [IoSliceMut]
) -> Poll<Result<usize, Error>>
impl<R, W: Write> AsyncWrite for Duplex<R, W>
[src]
fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context,
buf: &[u8]
) -> Poll<Result<usize>>
[src]
self: Pin<&mut Self>,
cx: &mut Context,
buf: &[u8]
) -> Poll<Result<usize>>
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context) -> Poll<Result<()>>
[src]
fn poll_close(self: Pin<&mut Self>, cx: &mut Context) -> Poll<Result<()>>
[src]
fn poll_write_vectored(
self: Pin<&mut Self>,
cx: &mut Context,
bufs: &[IoSlice]
) -> Poll<Result<usize, Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context,
bufs: &[IoSlice]
) -> Poll<Result<usize, Error>>
impl<R: Debug, W: Debug> Debug for Duplex<R, W>
[src]
impl<'__pin, R, W> Unpin for Duplex<R, W> where
__Origin<'__pin, R, W>: Unpin,
[src]
__Origin<'__pin, R, W>: Unpin,
Auto Trait Implementations
impl<R, W> RefUnwindSafe for Duplex<R, W> where
R: RefUnwindSafe,
W: RefUnwindSafe,
R: RefUnwindSafe,
W: RefUnwindSafe,
impl<R, W> Send for Duplex<R, W> where
R: Send,
W: Send,
R: Send,
W: Send,
impl<R, W> Sync for Duplex<R, W> where
R: Sync,
W: Sync,
R: Sync,
W: Sync,
impl<R, W> UnwindSafe for Duplex<R, W> where
R: UnwindSafe,
W: UnwindSafe,
R: UnwindSafe,
W: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> BufReadExt for T where
T: AsyncBufRead + ?Sized,
[src]
T: AsyncBufRead + ?Sized,
fn read_until(
&'a mut self,
byte: u8,
buf: &'a mut Vec<u8>
) -> ReadUntilFuture<'a, Self> where
Self: Unpin,
[src]
&'a mut self,
byte: u8,
buf: &'a mut Vec<u8>
) -> ReadUntilFuture<'a, Self> where
Self: Unpin,
fn read_line(&'a mut self, buf: &'a mut String) -> ReadLineFuture<'a, Self> where
Self: Unpin,
[src]
Self: Unpin,
fn lines(self) -> Lines<Self> where
Self: Unpin,
[src]
Self: Unpin,
fn split(self, byte: u8) -> Split<Self>
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ReadExt for T where
T: AsyncRead + ?Sized,
[src]
T: AsyncRead + ?Sized,
fn read(&'a mut self, buf: &'a mut [u8]) -> ReadFuture<'a, Self> where
Self: Unpin,
[src]
Self: Unpin,
fn read_vectored(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectoredFuture<'a, Self> where
Self: Unpin,
[src]
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectoredFuture<'a, Self> where
Self: Unpin,
fn read_to_end(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEndFuture<'a, Self> where
Self: Unpin,
[src]
Self: Unpin,
fn read_to_string(
&'a mut self,
buf: &'a mut String
) -> ReadToStringFuture<'a, Self> where
Self: Unpin,
[src]
&'a mut self,
buf: &'a mut String
) -> ReadToStringFuture<'a, Self> where
Self: Unpin,
fn read_exact(&'a mut self, buf: &'a mut [u8]) -> ReadExactFuture<'a, Self> where
Self: Unpin,
[src]
Self: Unpin,
fn take(self, limit: u64) -> Take<Self>
[src]
fn by_ref(&mut self) -> &mut Self
[src]
fn bytes(self) -> Bytes<Self>
[src]
fn chain<R>(self, next: R) -> Chain<Self, R> where
R: AsyncRead,
[src]
R: AsyncRead,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> WriteExt for T where
T: AsyncWrite + ?Sized,
[src]
T: AsyncWrite + ?Sized,
fn write(&'a mut self, buf: &'a [u8]) -> WriteFuture<'a, Self> where
Self: Unpin,
[src]
Self: Unpin,
fn flush(&mut self) -> FlushFuture<Self> where
Self: Unpin,
[src]
Self: Unpin,
fn write_vectored(
&'a mut self,
bufs: &'a [IoSlice<'a>]
) -> WriteVectoredFuture<'a, Self> where
Self: Unpin,
[src]
&'a mut self,
bufs: &'a [IoSlice<'a>]
) -> WriteVectoredFuture<'a, Self> where
Self: Unpin,
fn write_all(&'a mut self, buf: &'a [u8]) -> WriteAllFuture<'a, Self> where
Self: Unpin,
[src]
Self: Unpin,
fn write_fmt(&'a mut self, fmt: Arguments) -> WriteFmtFuture<'a, Self> where
Self: Unpin,
[src]
Self: Unpin,