Trait libp2prs_core::muxing::StreamMuxer [−][src]
pub trait StreamMuxer { #[must_use] fn open_stream<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<IReadWrite, TransportError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait; #[must_use] fn accept_stream<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<IReadWrite, TransportError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait; #[must_use] fn close<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait; fn task(&mut self) -> Option<BoxFuture<'static, ()>>; fn box_clone(&self) -> IStreamMuxer; }
Required methods
#[must_use]fn open_stream<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<IReadWrite, TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]
fn open_stream<'life0, 'async_trait>(&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<IReadWrite, TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Opens a new outgoing substream.
#[must_use]fn accept_stream<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<IReadWrite, TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]
fn accept_stream<'life0, 'async_trait>(&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<IReadWrite, TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Accepts a new incoming substream.
#[must_use]fn close<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]
fn close<'life0, 'async_trait>(&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Closes the stream muxer, the runtime of stream muxer will then exit.
fn task(&mut self) -> Option<BoxFuture<'static, ()>>
[src]
Returns a Future which represents the main loop of the stream muxer.
fn box_clone(&self) -> IStreamMuxer
[src]
Returns the cloned Trait object.
Implementors
impl<A, B> StreamMuxer for EitherOutput<A, B> where
A: StreamMuxer + Send,
B: StreamMuxer + Send,
[src]
A: StreamMuxer + Send,
B: StreamMuxer + Send,
fn open_stream<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<IReadWrite, TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<IReadWrite, TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn accept_stream<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<IReadWrite, TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<IReadWrite, TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn close<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,