pub struct MPTAmount<'a> {
pub value: Cow<'a, str>,
pub mpt_issuance_id: Cow<'a, str>,
}Expand description
An MPT (Multi-Purpose Token) amount.
MPT amounts represent a quantity of a specific Multi-Purpose Token, identified by its issuance ID.
JSON shape per XRPL:
{"value": "<u64 string>", "mpt_issuance_id": "<48-hex-char string>"}
See MPToken:
<https://xrpl.org/docs/references/protocol/ledger-data/ledger-entry-types/mptoken>
Fields§
§value: Cow<'a, str>The token quantity, expressed as a non-negative integer string.
mpt_issuance_id: Cow<'a, str>The MPTokenIssuanceID that identifies which MPT this amount belongs to. Must be a 48-character ASCII hex string (24 bytes, Hash192).
Implementations§
Trait Implementations§
Source§impl<'de, 'a> Deserialize<'de> for MPTAmount<'a>
impl<'de, 'a> Deserialize<'de> for MPTAmount<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<'a> Eq for MPTAmount<'a>
Source§impl<'a> Model for MPTAmount<'a>
impl<'a> Model for MPTAmount<'a>
Source§fn get_errors(&self) -> XRPLModelResult<()>
fn get_errors(&self) -> XRPLModelResult<()>
Collects a models errors and returns the first error that occurs.
Source§fn validate(&self) -> XRPLModelResult<()>
fn validate(&self) -> XRPLModelResult<()>
Simply forwards the error from
get_errors if there was one.impl<'a> StructuralPartialEq for MPTAmount<'a>
Auto Trait Implementations§
impl<'a> Freeze for MPTAmount<'a>
impl<'a> RefUnwindSafe for MPTAmount<'a>
impl<'a> Send for MPTAmount<'a>
impl<'a> Sync for MPTAmount<'a>
impl<'a> Unpin for MPTAmount<'a>
impl<'a> UnsafeUnpin for MPTAmount<'a>
impl<'a> UnwindSafe for MPTAmount<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.