pub struct Yamux<S>(_);
Expand description
A Yamux connection.
Trait Implementations§
source§impl<S> StreamMuxer for Yamux<S>where
S: Stream<Item = Result<Stream, YamuxError>> + Unpin,
impl<S> StreamMuxer for Yamux<S>where
S: Stream<Item = Result<Stream, YamuxError>> + Unpin,
Note: This implementation never emits
StreamMuxerEvent::AddressChange
events.
§type Substream = Stream
type Substream = Stream
Type of the object that represents the raw substream where data can be read and written.
§type OutboundSubstream = OpenSubstreamToken
type OutboundSubstream = OpenSubstreamToken
Future that will be resolved when the outgoing substream is open.
§type Error = YamuxError
type Error = YamuxError
Error type of the muxer
source§fn poll_event(
&self,
c: &mut Context<'_>
) -> Poll<Result<StreamMuxerEvent<<Yamux<S> as StreamMuxer>::Substream>, YamuxError>>
fn poll_event(
&self,
c: &mut Context<'_>
) -> Poll<Result<StreamMuxerEvent<<Yamux<S> as StreamMuxer>::Substream>, YamuxError>>
Polls for a connection-wide event. Read more
source§fn open_outbound(&self) -> <Yamux<S> as StreamMuxer>::OutboundSubstream
fn open_outbound(&self) -> <Yamux<S> as StreamMuxer>::OutboundSubstream
Opens a new outgoing substream, and produces the equivalent to a future that will be
resolved when it becomes available. Read more
source§fn poll_outbound(
&self,
c: &mut Context<'_>,
_: &mut OpenSubstreamToken
) -> Poll<Result<<Yamux<S> as StreamMuxer>::Substream, YamuxError>>
fn poll_outbound(
&self,
c: &mut Context<'_>,
_: &mut OpenSubstreamToken
) -> Poll<Result<<Yamux<S> as StreamMuxer>::Substream, YamuxError>>
Polls the outbound substream. Read more
source§fn destroy_outbound(&self, _: <Yamux<S> as StreamMuxer>::OutboundSubstream)
fn destroy_outbound(&self, _: <Yamux<S> as StreamMuxer>::OutboundSubstream)
Destroys an outbound substream future. Use this after the outbound substream has finished,
or if you want to interrupt it. Read more
source§fn poll_close(&self, c: &mut Context<'_>) -> Poll<Result<(), YamuxError>>
fn poll_close(&self, c: &mut Context<'_>) -> Poll<Result<(), YamuxError>>
Closes this
StreamMuxer
. Read more