stream_multiplexer/
error.rs1use crate::*;
2
3#[derive(thiserror::Error, Debug)]
8pub enum MultiplexerError<SE: std::fmt::Debug> {
9    #[error("Could not add stream {0} to channel {1}.")]
11    ChannelAdd(StreamId, ChannelId),
12
13    #[error("Could not add stream to full channel {0}.")]
15    ChannelFull(ChannelId),
16
17    #[error("Channel {0} already exists")]
19    DuplicateChannel(ChannelId),
20
21    #[error("Stream {0} does not exist.")]
23    UnknownStream(StreamId),
24
25    #[error("Channel {0} is unknown.")]
27    UnknownChannel(ChannelId),
28
29    #[error("Could not send item to sink {0} due to {1:?}")]
31    SendError(StreamId, SE),
32}