Skip to main content

unb_core/
error.rs

1#[derive(Debug, thiserror::Error)]
2pub enum CoreError {
3    #[error("malformed frame: {0}")]
4    Malformed(String),
5    #[error("session is not established")]
6    NotEstablished,
7    #[error("unknown stream {0}")]
8    UnknownStream(String),
9    #[error("{0} is not a stream-opening kind")]
10    BadKind(String),
11    #[error("establishment out of order: {0}")]
12    Establishment(String),
13    #[error("unknown session {0}")]
14    UnknownSession(String),
15    #[error("session {0} is already open")]
16    DuplicateSession(String),
17    #[error("core effect queue is full")]
18    EffectQueueFull,
19    #[error("session body registry exceeds {0} bytes")]
20    BodyRegistryFull(usize),
21    #[error("body exceeds the collect ceiling of {0} bytes")]
22    BodyTooLarge(usize),
23    #[error("body stalled past the backpressure deadline")]
24    BodyStalled,
25}