pub type Result<T> = core::result::Result<T, Error>;
#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
#[non_exhaustive]
pub enum Error {
#[error(transparent)]
BufferTooShort(#[from] broadcast_common::error::BufferTooShort),
#[error(transparent)]
OutputBufferTooSmall(#[from] broadcast_common::error::OutputBufferTooSmall),
#[error("invalid message_length {length}: {reason}")]
InvalidMessageLength {
length: u16,
reason: &'static str,
},
#[error("truncated parameter (type {ptype:#06X}): need {need}, have {have}")]
TruncatedParameter {
ptype: u16,
need: usize,
have: usize,
},
#[error(transparent)]
FieldOverflow(#[from] broadcast_common::error::FieldOverflow),
}