pub struct ChMux<TransportSink, TransportStream> { /* private fields */ }
Expand description
Channel multiplexer.
Implementationsยง
Sourceยงimpl<TransportSink, TransportSinkError, TransportStream, TransportStreamError> ChMux<TransportSink, TransportStream>
impl<TransportSink, TransportSinkError, TransportStream, TransportStreamError> ChMux<TransportSink, TransportStream>
Sourcepub async fn new(
cfg: Cfg,
transport_sink: TransportSink,
transport_stream: TransportStream,
) -> Result<(Self, Client, Listener), ChMuxError<TransportSinkError, TransportStreamError>>
pub async fn new( cfg: Cfg, transport_sink: TransportSink, transport_stream: TransportStream, ) -> Result<(Self, Client, Listener), ChMuxError<TransportSinkError, TransportStreamError>>
Sourcepub async fn run(
self,
) -> Result<(), ChMuxError<TransportSinkError, TransportStreamError>>
pub async fn run( self, ) -> Result<(), ChMuxError<TransportSinkError, TransportStreamError>>
Runs the multiplexer dispatcher.
The dispatcher terminates when the client, server and all channels have been dropped or the transport is closed.
Trait Implementationsยง
Auto Trait Implementationsยง
impl<TransportSink, TransportStream> Freeze for ChMux<TransportSink, TransportStream>
impl<TransportSink, TransportStream> !RefUnwindSafe for ChMux<TransportSink, TransportStream>
impl<TransportSink, TransportStream> Send for ChMux<TransportSink, TransportStream>
impl<TransportSink, TransportStream> Sync for ChMux<TransportSink, TransportStream>
impl<TransportSink, TransportStream> Unpin for ChMux<TransportSink, TransportStream>
impl<TransportSink, TransportStream> !UnwindSafe for ChMux<TransportSink, TransportStream>
Blanket Implementationsยง
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more