|
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"
|
|
}
|
|
)
|
|
}
|
|
} |