pub struct MptId(/* private fields */);Expand description
A 24-byte Multi-Purpose Token (MPT) identifier on the XRP Ledger.
An MPT ID uniquely identifies a multi-purpose token and consists of:
- Bytes 0-3: Sequence number (32 bits, big-endian)
- Bytes 4-23: Issuer account ID (160 bits)
§Derived Traits
Copy: Efficient for this 24-byte struct, enabling implicit copyingPartialEq, Eq: Enable comparisons and use in hash-based collectionsDebug, Clone: Standard traits for development and consistency
Implementations§
Source§impl MptId
impl MptId
Sourcepub fn new(sequence_num: u32, issuer: AccountID) -> Self
pub fn new(sequence_num: u32, issuer: AccountID) -> Self
Creates a new MptId from a sequence number and an issuer account ID.
Sourcepub fn get_sequence_num(&self) -> u32
pub fn get_sequence_num(&self) -> u32
Gets the sequence number part of the MptId.
Sourcepub fn get_issuer(&self) -> AccountID
pub fn get_issuer(&self) -> AccountID
Gets the issuer account ID part of the MptId.
pub fn as_ptr(&self) -> *const u8
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
impl Copy for MptId
impl Eq for MptId
impl StructuralPartialEq for MptId
Auto Trait Implementations§
impl Freeze for MptId
impl RefUnwindSafe for MptId
impl Send for MptId
impl Sync for MptId
impl Unpin for MptId
impl UnsafeUnpin for MptId
impl UnwindSafe for MptId
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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