#[non_exhaustive]pub enum AssetError {
Serialization(String),
Parsing(String),
ZeroAmount,
MissingId,
}Expand description
Errors related to asset parsing, validation, or formatting.
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.
Serialization(String)
Failed to serialize an asset to bytes or JSON.
Parsing(String)
Failed to parse an asset from bytes or JSON.
ZeroAmount
A token or native amount was zero, which is not allowed.
MissingId
The contract address or mint for a fungible token was not provided.
Trait Implementations§
Source§impl Debug for AssetError
impl Debug for AssetError
Source§impl Display for AssetError
impl Display for AssetError
Source§impl Error for AssetError
impl Error for AssetError
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 From<AssetError> for EscrowError
impl From<AssetError> for EscrowError
Source§fn from(source: AssetError) -> Self
fn from(source: AssetError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AssetError
impl RefUnwindSafe for AssetError
impl Send for AssetError
impl Sync for AssetError
impl Unpin for AssetError
impl UnsafeUnpin for AssetError
impl UnwindSafe for AssetError
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