Struct tetsy_multistream_select::Negotiated[][src]

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.


impl<TInner> Negotiated<TInner>[src]

pub fn complete(self) -> NegotiatedComplete<TInner>

Notable traits for NegotiatedComplete<TInner>

impl<TInner> Future for NegotiatedComplete<TInner> where
    TInner: AsyncRead + AsyncWrite + Unpin
type Output = Result<Negotiated<TInner>, NegotiationError>;

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

Trait Implementations

impl<TInner> AsyncRead for Negotiated<TInner> where
    TInner: AsyncRead + AsyncWrite + Unpin

impl<TInner> AsyncWrite for Negotiated<TInner> where
    TInner: AsyncWrite + AsyncRead + Unpin

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

impl<'pin, TInner> Unpin for Negotiated<TInner> where
    __Negotiated<'pin, TInner>: Unpin

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> UnwindSafe for Negotiated<TInner> where
    TInner: UnwindSafe

Blanket Implementations

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

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

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.