pub enum AssetIdParseError {
WrongLength {
got: usize,
},
NotHex,
}Expand description
Why an asset id could not be parsed. Deliberately small — an id is either 32 bytes of hex or it is not an id, and guessing at a near-miss is how a wallet ends up reading the wrong token.
Variants§
WrongLength
Not exactly ASSET_ID_HEX_LEN hex characters (after an optional 0x is stripped).
NotHex
A character outside [0-9a-fA-F].
Trait Implementations§
Source§impl Clone for AssetIdParseError
impl Clone for AssetIdParseError
Source§fn clone(&self) -> AssetIdParseError
fn clone(&self) -> AssetIdParseError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AssetIdParseError
Source§impl Debug for AssetIdParseError
impl Debug for AssetIdParseError
Source§impl Display for AssetIdParseError
impl Display for AssetIdParseError
impl Eq for AssetIdParseError
Source§impl Error for AssetIdParseError
impl Error for AssetIdParseError
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()
Source§impl PartialEq for AssetIdParseError
impl PartialEq for AssetIdParseError
impl StructuralPartialEq for AssetIdParseError
Auto Trait Implementations§
impl Freeze for AssetIdParseError
impl RefUnwindSafe for AssetIdParseError
impl Send for AssetIdParseError
impl Sync for AssetIdParseError
impl Unpin for AssetIdParseError
impl UnsafeUnpin for AssetIdParseError
impl UnwindSafe for AssetIdParseError
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