pub enum Error {
InvalidChainId(String),
InvalidNamespace(String),
InvalidReference(String),
InvalidAccountId(String),
InvalidAddressFormat(String, String),
InvalidAssetId(String),
InvalidAssetNamespace(String),
InvalidAssetReference(String),
UnrecognizedFormat(String),
InvalidEthereumAddress(String),
InvalidBitcoinAddress(String),
}Expand description
Error types for the CAIP library
Variants§
InvalidChainId(String)
Error when parsing a ChainId
InvalidNamespace(String)
Error when parsing a namespace
InvalidReference(String)
Error when parsing a reference
InvalidAccountId(String)
Error when parsing an AccountId
InvalidAddressFormat(String, String)
Error when validating an address format
InvalidAssetId(String)
Error when parsing an AssetId
InvalidAssetNamespace(String)
Error when parsing an asset namespace
InvalidAssetReference(String)
Error when parsing an asset reference
UnrecognizedFormat(String)
Error when parsing an input that doesn’t match any CAIP format
InvalidEthereumAddress(String)
Specific error for Ethereum address validation
InvalidBitcoinAddress(String)
Specific error for Bitcoin address validation
Trait Implementations§
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)>
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()
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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