blob: 0cdd26923457cbd18ac503c62dd2250b7e81c4aa (
plain) (
tree)
|
|
#[derive(Debug)]
pub enum DichroismError {
UriDataExtract(String),
ImageWrite(String),
}
impl std::error::Error for DichroismError {}
impl std::fmt::Display for DichroismError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", self)
}
}
impl From<image::ImageError> for DichroismError {
fn from(e: image::ImageError) -> Self {
Self::ImageWrite(e.to_string())
}
}
impl From<base64::DecodeError> for DichroismError {
fn from(e: base64::DecodeError) -> Self {
Self::UriDataExtract(e.to_string())
}
}
|