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