na_mpeg2_decoder/video/error.rs
1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum DecodeError {
5 #[error("invalid data: {0}")]
6 InvalidData(&'static str),
7
8 #[error("bitstream overread")]
9 Overread,
10
11 #[error("unsupported: {0}")]
12 Unsupported(&'static str),
13
14 #[error("internal: {0}")]
15 Internal(&'static str),
16}
17
18pub type Result<T> = std::result::Result<T, DecodeError>;