#[non_exhaustive]pub enum AddressError {
InvalidLength,
InvalidHex,
InvalidChecksum,
InvalidZone(ShardError),
WrongLedger {
expected: Ledger,
actual: Ledger,
},
}Expand description
Failure to parse an address or validate its ledger and zone.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidLength
Address strings must contain exactly 40 hex digits after an optional 0x.
InvalidHex
Only ASCII hexadecimal characters are accepted.
InvalidChecksum
A mixed-case input fails the Keccak capitalization checksum.
InvalidZone(ShardError)
The address does not encode a published zone.
WrongLedger
The typed address requires a different ledger.
Trait Implementations§
Source§impl Clone for AddressError
impl Clone for AddressError
impl Copy for AddressError
Source§impl Debug for AddressError
impl Debug for AddressError
Source§impl Display for AddressError
impl Display for AddressError
impl Eq for AddressError
Source§impl Error for AddressError
impl Error for AddressError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for AddressError
impl PartialEq for AddressError
impl StructuralPartialEq for AddressError
Auto Trait Implementations§
impl Forget for AddressError
impl Freeze for AddressError
impl Move for AddressError
impl RefUnwindSafe for AddressError
impl Send for AddressError
impl Sync for AddressError
impl Unpin for AddressError
impl UnsafeUnpin for AddressError
impl UnwindSafe for AddressError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more