use crate::*;
#[derive(thiserror::Error, Debug)]
pub enum MultiplexerError<SE: std::fmt::Debug> {
#[error("Could not add stream {0} to channel {1}.")]
ChannelAdd(StreamId, ChannelId),
#[error("Could not add stream to full channel {0}.")]
ChannelFull(ChannelId),
#[error("Channel {0} already exists")]
DuplicateChannel(ChannelId),
#[error("Stream {0} does not exist.")]
UnknownStream(StreamId),
#[error("Channel {0} is unknown.")]
UnknownChannel(ChannelId),
#[error("Could not send item to sink {0} due to {1:?}")]
SendError(StreamId, SE),
}