Function libp2p_core::muxing::event_from_ref_and_wrap [−][src]
pub fn event_from_ref_and_wrap<P>(
muxer: P
) -> impl Future<Output = Result<StreamMuxerEvent<SubstreamRef<P>>, <P::Target as StreamMuxer>::Error>> where
P: Deref + Clone,
P::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
.