Trait libp2p_core::muxing::StreamMuxerExt

source ·
pub trait StreamMuxerExt: StreamMuxer + Sized {
    // Provided methods
    fn poll_inbound_unpin(
        &mut self,
        cx: &mut Context<'_>,
    ) -> Poll<Result<Self::Substream, Self::Error>>
       where Self: Unpin { ... }
    fn poll_outbound_unpin(
        &mut self,
        cx: &mut Context<'_>,
    ) -> Poll<Result<Self::Substream, Self::Error>>
       where Self: Unpin { ... }
    fn poll_unpin(
        &mut self,
        cx: &mut Context<'_>,
    ) -> Poll<Result<StreamMuxerEvent, Self::Error>>
       where Self: Unpin { ... }
    fn poll_close_unpin(
        &mut self,
        cx: &mut Context<'_>,
    ) -> Poll<Result<(), Self::Error>>
       where Self: Unpin { ... }
    fn close(self) -> Close<Self>  { ... }
}
Expand description

Extension trait for StreamMuxer.

Provided Methods§

source

fn poll_inbound_unpin( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<Self::Substream, Self::Error>>
where Self: Unpin,

Convenience function for calling StreamMuxer::poll_inbound for StreamMuxers that are Unpin.

source

fn poll_outbound_unpin( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<Self::Substream, Self::Error>>
where Self: Unpin,

Convenience function for calling StreamMuxer::poll_outbound for StreamMuxers that are Unpin.

source

fn poll_unpin( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<StreamMuxerEvent, Self::Error>>
where Self: Unpin,

Convenience function for calling StreamMuxer::poll for StreamMuxers that are Unpin.

source

fn poll_close_unpin( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>
where Self: Unpin,

Convenience function for calling StreamMuxer::poll_close for StreamMuxers that are Unpin.

source

fn close(self) -> Close<Self>

Returns a future for closing this StreamMuxer.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<S> StreamMuxerExt for S
where S: StreamMuxer,