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 Stream>, 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 Stream>, 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 AsyncWrite for Stream

source§

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

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

fn poll_write_vectored( self: Pin<&mut Stream>, 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§

fn poll_flush( self: Pin<&mut Stream>, 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 Stream>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>

Attempt to close the object. Read more
source§

impl Debug for Stream

source§

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

Formats the value using the given formatter. Read more