[−][src]Struct multistream_select::Negotiated
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.
Implementations
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>;
[src]
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,
[src]
TInner: AsyncRead + AsyncWrite + Unpin,
fn poll_read(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut [u8]
) -> Poll<Result<usize, Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &mut [u8]
) -> Poll<Result<usize, Error>>
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<TInner> AsyncWrite for Negotiated<TInner> where
TInner: AsyncWrite + AsyncRead + Unpin,
[src]
TInner: AsyncWrite + AsyncRead + Unpin,
fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8]
) -> Poll<Result<usize, Error>>
[src]
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>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<(), Error>>
fn poll_close(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<(), Error>>
[src]
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>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>]
) -> Poll<Result<usize, Error>>
impl<TInner: Debug> Debug for Negotiated<TInner>
[src]
impl<'pin, TInner> Unpin for Negotiated<TInner> where
__Negotiated<'pin, TInner>: Unpin,
[src]
__Negotiated<'pin, TInner>: Unpin,
Auto Trait Implementations
impl<TInner> RefUnwindSafe for Negotiated<TInner> where
TInner: RefUnwindSafe,
TInner: RefUnwindSafe,
impl<TInner> Send for Negotiated<TInner> where
TInner: Send,
TInner: Send,
impl<TInner> Sync for Negotiated<TInner> where
TInner: Sync,
TInner: Sync,
impl<TInner> UnwindSafe for Negotiated<TInner> where
TInner: UnwindSafe,
TInner: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<R> AsyncReadExt for R where
R: AsyncRead + ?Sized,
[src]
R: AsyncRead + ?Sized,
fn chain<R>(self, next: R) -> Chain<Self, R> where
R: AsyncRead,
[src]
R: AsyncRead,
fn read(&'a mut self, buf: &'a mut [u8]) -> Read<'a, Self> where
Self: Unpin,
[src]
Self: Unpin,
fn read_vectored(
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectored<'a, Self> where
Self: Unpin,
[src]
&'a mut self,
bufs: &'a mut [IoSliceMut<'a>]
) -> ReadVectored<'a, Self> where
Self: Unpin,
fn read_exact(&'a mut self, buf: &'a mut [u8]) -> ReadExact<'a, Self> where
Self: Unpin,
[src]
Self: Unpin,
fn read_to_end(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEnd<'a, Self> where
Self: Unpin,
[src]
Self: Unpin,
fn read_to_string(&'a mut self, buf: &'a mut String) -> ReadToString<'a, Self> where
Self: Unpin,
[src]
Self: Unpin,
fn split(self) -> (ReadHalf<Self>, WriteHalf<Self>) where
Self: AsyncWrite,
[src]
Self: AsyncWrite,
fn take(self, limit: u64) -> Take<Self>
[src]
impl<W> AsyncWriteExt for W where
W: AsyncWrite + ?Sized,
[src]
W: AsyncWrite + ?Sized,
fn flush(&mut self) -> Flush<'_, Self> where
Self: Unpin,
[src]
Self: Unpin,
fn close(&mut self) -> Close<'_, Self> where
Self: Unpin,
[src]
Self: Unpin,
fn write(&'a mut self, buf: &'a [u8]) -> Write<'a, Self> where
Self: Unpin,
[src]
Self: Unpin,
fn write_vectored(
&'a mut self,
bufs: &'a [IoSlice<'a>]
) -> WriteVectored<'a, Self> where
Self: Unpin,
[src]
&'a mut self,
bufs: &'a [IoSlice<'a>]
) -> WriteVectored<'a, Self> where
Self: Unpin,
fn write_all(&'a mut self, buf: &'a [u8]) -> WriteAll<'a, Self> where
Self: Unpin,
[src]
Self: Unpin,
fn into_sink<Item>(self) -> IntoSink<Self, Item> where
Item: AsRef<[u8]>,
[src]
Item: AsRef<[u8]>,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[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, 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.
pub 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>,