Type Alias libp2p_core::Negotiated

source ·
pub type Negotiated<T> = Negotiated<T>;

Aliased Type§

struct Negotiated<T> { /* private fields */ }

Implementations

source§

impl<TInner> Negotiated<TInner>

source

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

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

Trait Implementations

source§

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

source§

fn poll_read( self: Pin<&mut Negotiated<TInner>>, cx: &mut Context<'_>, buf: &mut [u8], ) -> Poll<Result<usize, Error>>

Attempt to read from the AsyncRead into buf. Read more
source§

fn poll_read_vectored( self: Pin<&mut Negotiated<TInner>>, cx: &mut Context<'_>, bufs: &mut [IoSliceMut<'_>], ) -> Poll<Result<usize, Error>>

Attempt to read from the AsyncRead into bufs using vectored IO operations. Read more
source§

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

source§

fn poll_write( self: Pin<&mut Negotiated<TInner>>, cx: &mut Context<'_>, buf: &[u8], ) -> Poll<Result<usize, Error>>

Attempt to write bytes from buf into the object. Read more
source§

fn poll_flush( self: Pin<&mut Negotiated<TInner>>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>

Attempt to flush the object, ensuring that any buffered data reach their destination. Read more
source§

fn poll_close( self: Pin<&mut Negotiated<TInner>>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>

Attempt to close the object. Read more
source§

fn poll_write_vectored( self: Pin<&mut Negotiated<TInner>>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>], ) -> Poll<Result<usize, Error>>

Attempt to write bytes from bufs into the object using vectored IO operations. Read more
source§

impl<TInner> Debug for Negotiated<TInner>
where TInner: Debug,

source§

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

Formats the value using the given formatter. Read more
source§

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