1pub type Result<T> = core::result::Result<T, Error>;
5
6#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
8#[non_exhaustive]
9pub enum Error {
10 #[error("buffer too short: need {need}, have {have} ({what})")]
12 BufferTooShort {
13 need: usize,
15 have: usize,
17 what: &'static str,
19 },
20 #[error("output buffer too small: need {need}, have {have}")]
22 OutputBufferTooSmall {
23 need: usize,
25 have: usize,
27 },
28 #[error("too many cc triplets: {0} (cc_count is 5-bit, max 31)")]
30 TooManyTriplets(usize),
31}