libp2p::core::muxing

Trait StreamMuxerExt

pub trait StreamMuxerExt: Sized + StreamMuxer {
    // 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§

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.

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.

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.

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.

fn close(self) -> Close<Self>

Returns a future for closing this StreamMuxer.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

§

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