#[derive(Debug, thiserror::Error)]
pub enum CoreError {
#[error("malformed frame: {0}")]
Malformed(String),
#[error("session is not established")]
NotEstablished,
#[error("unknown stream {0}")]
UnknownStream(String),
#[error("{0} is not a stream-opening kind")]
BadKind(String),
#[error("establishment out of order: {0}")]
Establishment(String),
#[error("unknown session {0}")]
UnknownSession(String),
#[error("session {0} is already open")]
DuplicateSession(String),
#[error("core effect queue is full")]
EffectQueueFull,
#[error("session body registry exceeds {0} bytes")]
BodyRegistryFull(usize),
#[error("body exceeds the collect ceiling of {0} bytes")]
BodyTooLarge(usize),
#[error("body stalled past the backpressure deadline")]
BodyStalled,
}