#[non_exhaustive]
#[derive(Debug, thiserror::Error)]
pub enum RtmpError {
#[error("buffer too short for {what}: need {need}, have {have}")]
BufferTooShort {
need: usize,
have: usize,
what: &'static str,
},
#[error("malformed {what}")]
Malformed {
what: &'static str,
},
#[error("unexpected state: {what}")]
UnexpectedState {
what: &'static str,
},
#[error("unsupported: {what}")]
Unsupported {
what: &'static str,
},
#[error(transparent)]
FieldOverflow(#[from] broadcast_common::len::FieldOverflow),
}