fif/src/scanerror.rs

17 lines
313 B
Rust

use std::fmt::{Display, Formatter, Result};
pub enum ScanError {
File,
Mime
}
impl Display for ScanError {
fn fmt(&self, f: &mut Formatter<'_>) -> Result {
write!(f, "{}",
match self {
Self::File => "Couldn't read file",
Self::Mime => "Couldn't determine mime type"
}
)
}
}