[][src]Struct multistream_select::Negotiated

pub struct Negotiated<TInner> { /* fields omitted */ }

An I/O stream that has settled on an (application-layer) protocol to use.

A Negotiated represents an I/O stream that has settled on a protocol to use. In particular, it is not implied that all of the protocol negotiation frames have yet been sent and / or received, just that the selected protocol is fully determined. This is to allow the last protocol negotiation frames sent by a peer to be combined in a single write, possibly piggy-backing data from the negotiated protocol on top.

Reading from a Negotiated I/O stream that still has pending negotiation protocol data to send implicitly triggers flushing of all yet unsent data.

Methods

impl<TInner> Negotiated<TInner>[src]

pub fn complete(self) -> NegotiatedComplete<TInner>[src]

Returns a NegotiatedComplete future that waits for protocol negotiation to complete.

Trait Implementations

impl<TInner> AsyncRead for Negotiated<TInner> where
    TInner: AsyncRead + AsyncWrite
[src]

impl<TInner> AsyncWrite for Negotiated<TInner> where
    TInner: AsyncWrite + AsyncRead
[src]

impl<TInner: Debug> Debug for Negotiated<TInner>[src]

impl<R> Read for Negotiated<R> where
    R: AsyncRead + AsyncWrite
[src]

impl<TInner> Write for Negotiated<TInner> where
    TInner: AsyncWrite
[src]

Auto Trait Implementations

impl<TInner> RefUnwindSafe for Negotiated<TInner> where
    TInner: RefUnwindSafe

impl<TInner> Send for Negotiated<TInner> where
    TInner: Send

impl<TInner> Sync for Negotiated<TInner> where
    TInner: Sync

impl<TInner> Unpin for Negotiated<TInner> where
    TInner: Unpin

impl<TInner> UnwindSafe for Negotiated<TInner> where
    TInner: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?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<R> ReadBytesExt for R where
    R: Read + ?Sized

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<W> WriteBytesExt for W where
    W: Write + ?Sized