av_stream_info_rust/
decodeerror.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use std::error::Error;
use std::fmt;
use serde::{Deserialize, Serialize};

/// Decoding errors for headers
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum DecodeError {
    LatMissing,
    LongMissing,
    NumberParseError,
}

impl fmt::Display for DecodeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.to_string())
    }
}

impl Error for DecodeError {}