pub type Result<T> = core::result::Result<T, Error>;
#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
#[non_exhaustive]
pub enum Error {
#[error("buffer too short: need {need}, have {have} ({what})")]
BufferTooShort {
need: usize,
have: usize,
what: &'static str,
},
#[error("output buffer too small: need {need}, have {have}")]
OutputBufferTooSmall {
need: usize,
have: usize,
},
#[error("too many cc triplets: {0} (cc_count is 5-bit, max 31)")]
TooManyTriplets(usize),
}