Type Alias libp2p_swarm::NegotiatedSubstream

source ·
pub type NegotiatedSubstream = Stream;
👎Deprecated: The ‘substream’ terminology is deprecated. Use ‘Stream’ instead
Expand description

Substream for which a protocol has been chosen.

Implements the AsyncRead and AsyncWrite traits.

Aliased Type§

struct NegotiatedSubstream(/* private fields */);

Trait Implementations

source§

impl AsyncRead for Stream

source§

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

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

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

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

impl AsyncWrite for Stream

source§

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

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

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

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

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

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

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

Attempt to close the object. Read more
source§

impl Debug for Stream

source§

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

Formats the value using the given formatter. Read more