1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
use std::fmt;
use std::error::Error;
pub use ebml_iterable::error::TagIteratorError;
pub use ebml_iterable::error::TagWriterError;
pub use ebml_iterable::error::ToolError;
#[derive(Debug)]
pub enum WebmCoercionError {
BlockCoercionError(String),
SimpleBlockCoercionError(String),
}
impl fmt::Display for WebmCoercionError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
WebmCoercionError::BlockCoercionError(msg) => write!(f, "{}", msg),
WebmCoercionError::SimpleBlockCoercionError(msg) => write!(f, "{}", msg),
}
}
}
impl Error for WebmCoercionError {}