#[repr(C)]pub struct Currency(pub [u8; 20]);Expand description
Represents a currency code in the XRPL, which is a 20-byte identifier.
Currency codes in XRPL can be either:
- Standard currencies: 3-character ASCII codes (e.g., “USD”, “EUR”) stored in bytes 12-14
- Non-standard currencies: Full 20-byte hex values for custom tokens
§Derived Traits
Copy: Efficient for this 20-byte struct, enabling implicit copyingPartialEq, Eq: Enable comparisons and use in hash-based collectionsDebug, Clone: Standard traits for development and consistency
Tuple Fields§
§0: [u8; 20]Implementations§
Trait Implementations§
impl Copy for Currency
impl Eq for Currency
Source§impl FieldDecoder for Currency
FieldDecoder for XRPL currency codes: decodes a 20-byte buffer into a Currency, failing if
the host wrote a different number of bytes.
impl FieldDecoder for Currency
FieldDecoder for XRPL currency codes: decodes a 20-byte buffer into a Currency, failing if
the host wrote a different number of bytes.
impl FromLedger for Currency
impl StructuralPartialEq for Currency
Auto Trait Implementations§
impl Freeze for Currency
impl RefUnwindSafe for Currency
impl Send for Currency
impl Sync for Currency
impl Unpin for Currency
impl UnsafeUnpin for Currency
impl UnwindSafe for Currency
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