#[non_exhaustive]pub enum Error {
UnknownBase {
code: char,
},
InvalidBaseString,
BaseXDecode,
Base256EmojiDecode,
DataEncodingDecode {
message: String,
},
EmptyInput,
}Expand description
Error types for multibase operations.
This enum uses thiserror for ergonomic error handling.
§Non-exhaustive
This enum is marked #[non_exhaustive] to allow adding new error variants
in the future without breaking changes.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnknownBase
Unknown base code encountered.
The provided character does not correspond to any known base encoding in the multibase specification.
InvalidBaseString
Invalid base string format.
The string could not be decoded using the specified base encoding. This is a generic decoding error when the specific cause is unknown.
BaseXDecode
Base-x decoding failed.
Used for Base10, Base36, and Base58 variants that use the base-x library.
Base256EmojiDecode
Base256Emoji decoding failed.
The input string contained invalid emoji sequences or could not be
decoded as Base256Emoji.
DataEncodingDecode
Data-encoding decoding failed.
Used for Base2, Base8, Base16, Base32, Base64 variants that use
the data-encoding library.
EmptyInput
Empty input string.
The decode function was called with an empty string, which cannot contain a valid base code prefix.
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()