[][src]Function libp2p::core::muxing::event_from_ref_and_wrap

pub fn event_from_ref_and_wrap<P>(
    muxer: P
) -> impl Future<Output = Result<StreamMuxerEvent<SubstreamRef<P>>, <<P as Deref>::Target as StreamMuxer>::Error>> where
    P: Deref + Clone,
    <P as Deref>::Target: StreamMuxer

Polls for an event from the muxer and, if an inbound substream, wraps this substream in an object that implements Read/Write/AsyncRead/AsyncWrite.