use core::fmt::{self, Display, Formatter};
#[derive(Debug, Clone)]
pub enum Base64DecodedError {
Invalid,
PaddingMust,
PaddingDisallow,
Decode,
}
impl Display for Base64DecodedError {
#[inline]
fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> {
match self {
Self::Invalid => f.write_str("invalid Base64"),
Self::PaddingMust => f.write_str("padding not found"),
Self::PaddingDisallow => f.write_str("padding not allowed"),
Self::Decode => f.write_str("decoded incorrectly"),
}
}
}
impl core::error::Error for Base64DecodedError {}