[][src]Struct async_smux::MuxStream

pub struct MuxStream<T> { /* fields omitted */ }

A virtual AsyncRead + AsyncWrite stream spawned by Mux.

Async read() write() method can read or write at most 65535 bytes for each call. Use read_exact() and write_exact() to read or write huge payload instead.

It's ok to drop MuxStream directly without calling close(). Mux will try to notify the remote side to close the virtual stream in the next connect() or accept() call. But it's still recommended to close the stream explicitly after using.

Implementations

impl<T> MuxStream<T>[src]

pub fn stream_id(&self) -> u32[src]

Gets the unique stream ID.

Trait Implementations

impl<T: AsyncRead + AsyncWrite + Unpin + Send + 'static> AsyncRead for MuxStream<T>[src]

impl<T: AsyncRead + AsyncWrite + Unpin + Send + 'static> AsyncWrite for MuxStream<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for MuxStream<T>

impl<T> Send for MuxStream<T> where
    T: Send

impl<T> !Sync for MuxStream<T>

impl<T> Unpin for MuxStream<T>

impl<T> !UnwindSafe for MuxStream<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<R> AsyncReadExt for R where
    R: AsyncRead + ?Sized
[src]

impl<R> AsyncReadExt for R where
    R: AsyncRead + ?Sized
[src]

impl<W> AsyncWriteExt for W where
    W: AsyncWrite + ?Sized
[src]

impl<W> AsyncWriteExt for W where
    W: AsyncWrite + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,