Enum lb64::error::Base64Error
source · pub enum Base64Error {
OverflowError,
InvalidBase64CharacterError,
}
Expand description
Possible errors when decoding Base64 number
Variants§
OverflowError
Unsigned Overflow when decoding Base64 number to unsigned
Only applies to Base64::decode_to_unsigned
Example:
use lb64::{Base64, config::MIME};
let b64 = Base64::new_random(999, MIME);
match b64.decode_to_unsigned() {
Ok(value) => println!("This is impossible"),
Err(e) => println!("{}", e), // Base64Error::OverflowError occurred
}
InvalidBase64CharacterError
Invalid character in Base64 provided &str
Only applies to Base64::new_from_string
Example:
use lb64::{Base64, config::MIME};
match Base64::new_from_string(&"^_^", MIME) {
Ok(value) => println!("This is impossible"),
Err(e) => println!("{}", e), // Base64Error::InvalidBase64CharacterError occurred
}
Trait Implementations§
source§impl Debug for Base64Error
impl Debug for Base64Error
source§impl Display for Base64Error
impl Display for Base64Error
source§impl Error for Base64Error
impl Error for Base64Error
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more