Skip to main content

dvb_csa/
error.rs

1//! Error types for the DVB-CSA crate.
2use thiserror::Error;
3
4/// Errors that can occur during DVB-CSA operations.
5#[non_exhaustive]
6#[derive(Error, Debug)]
7pub enum Error {
8    /// The provided buffer is too short for the requested operation.
9    #[error("buffer too short: need {need} bytes, have {have}")]
10    BufferTooShort {
11        /// The number of bytes required.
12        need: usize,
13        /// The number of bytes available.
14        have: usize,
15    },
16}