Struct Join

pub struct Join<R, W> { /* private fields */ }

Joins two values implementing AsyncRead and AsyncWrite into a single handle.

Implementations

impl<R, W> Join<R, W> where R: AsyncRead, W: AsyncWrite,

fn into_inner(self) -> (R, W)

Splits this Join back into its AsyncRead and AsyncWrite components.

fn reader(&self) -> &R

Returns a reference to the inner reader.

fn writer(&self) -> &W

Returns a reference to the inner writer.

fn reader_mut(&mut self) -> &mut R

Returns a mutable reference to the inner reader.

fn writer_mut(&mut self) -> &mut W

Returns a mutable reference to the inner writer.

fn reader_pin_mut(self: Pin<&mut Self>) -> Pin<&mut R>

Returns a pinned mutable reference to the inner reader.

fn writer_pin_mut(self: Pin<&mut Self>) -> Pin<&mut W>

Returns a pinned mutable reference to the inner writer.

Trait Implementations

impl<'__pin, R, W> Unpin for Join<R, W> where PinnedFieldsOf<__Origin<'__pin, R, W>>: Unpin,

impl<R, W> AsyncBufRead for Join<R, W> where R: AsyncBufRead,

fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<&[u8]>>
fn consume(self: Pin<&mut Self>, amt: usize)

impl<R, W> AsyncRead for Join<R, W> where R: AsyncRead,

fn poll_read(self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut ReadBuf<'_>) -> Poll<Result<(), Error>>

impl<R, W> AsyncWrite for Join<R, W> where W: AsyncWrite,

fn poll_write(self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8]) -> Poll<Result<usize, Error>>
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Error>>
fn poll_shutdown(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Error>>
fn poll_write_vectored(self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>]) -> Poll<Result<usize, Error>>
fn is_write_vectored(&self) -> bool

impl<R: Debug, W: Debug> Debug for Join<R, W>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Auto Trait Implementations

impl<R, W> Freeze for Join<R, W> where R: Freeze, W: Freeze,

impl<R, W> RefUnwindSafe for Join<R, W> where R: RefUnwindSafe, W: RefUnwindSafe,

impl<R, W> Send for Join<R, W> where R: Send, W: Send,

impl<R, W> Sync for Join<R, W> where R: Sync, W: Sync,

impl<R, W> UnsafeUnpin for Join<R, W> where R: UnsafeUnpin, W: UnsafeUnpin,

impl<R, W> UnwindSafe for Join<R, W> where R: UnwindSafe, W: UnwindSafe,

Blanket Implementations

impl<R> AsyncBufReadExt for Join<R, W> where R: AsyncBufRead + ?Sized,

impl<R> AsyncReadExt for Join<R, W> where R: AsyncRead + ?Sized,

impl<T> Any for Join<R, W> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Join<R, W> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Join<R, W> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for Join<R, W>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into<U> for Join<R, W> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for Join<R, W> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for Join<R, W> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

impl<W> AsyncWriteExt for Join<R, W> where W: AsyncWrite + ?Sized,