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

pub fn substream_from_ref<P>(
    muxer: P,
    substream: <<P as Deref>::Target as StreamMuxer>::Substream
) -> SubstreamRef<P> where
    P: Deref,
    <P as Deref>::Target: StreamMuxer

Builds an implementation of Read/Write/AsyncRead/AsyncWrite from an Arc to the muxer and a substream.