Function libp2p_core::muxing::substream_from_ref
source · [−]pub fn substream_from_ref<P>(
muxer: P,
substream: <P::Target as StreamMuxer>::Substream
) -> SubstreamRef<P> where
P: Deref,
P::Target: StreamMuxer,
Expand description
Builds an implementation of Read
/Write
/AsyncRead
/AsyncWrite
from an Arc
to the
muxer and a substream.