[][src]Crate stream_multiplexer

This crate provides stream multiplexing with channels.

Channels have their own backpressure that does not affect other channels.

Incoming streams are by default set to channel 0 and can be moved to other channels via ControlMessages.

Structs

IncomingMessage

Produced by the incoming stream

IncrementIdGen

Generates IDs for incoming streams. Is the default IdGen for MultiplexerSenders. This implementation simply increments and wraps at the usize boundary.

Multiplexer

Manages incoming streams of data and the enqueueing of outgoing data.

OutgoingMessage

The payload of an OutgoingPacket

Enums

ControlMessage

To control the multiplexer, ControlMessage can be sent to the control channel passed into Multiplexer.run()

IncomingPacket

A packet representing a message from a stream.

MultiplexerError

A collection of errors that can be returned.

OutgoingPacket

For sending a message or causing the stream to change to a different channel

Traits

IdGen

Provided to MultiplexerSenders to override the default incrementing generator