ewf_forensic/error.rs
1use std::fmt;
2
3#[derive(Debug)]
4pub enum EwfForensicError {
5 TooShort { expected: usize, got: usize },
6}
7
8impl fmt::Display for EwfForensicError {
9 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
10 match self {
11 Self::TooShort { expected, got } => {
12 write!(f, "data too short: expected {expected}, got {got}")
13 }
14 }
15 }
16}
17
18impl std::error::Error for EwfForensicError {}