Struct coreledger_backend::types::UniqueAssetId
pub struct UniqueAssetId {
pub ledger_id: LedgerId,
pub asset_id: AssetId,
}
Expand description
Represents globally unique asset identifier.
Is de-/serialized as 12-bytes-long unsigned big integer value, e.g.:
0xF94E2AD9DD5CBBC041430001
77_156_266_017_731_438_122_811_719_681
Fields§
§ledger_id: LedgerId
Id of the ledger, to which the asset belongs.
asset_id: AssetId
Locally (ledger-scoped) id of the asset.
Implementations§
§impl UniqueAssetId
impl UniqueAssetId
Trait Implementations§
§impl CandidType for UniqueAssetId
impl CandidType for UniqueAssetId
§impl Clone for UniqueAssetId
impl Clone for UniqueAssetId
§fn clone(&self) -> UniqueAssetId
fn clone(&self) -> UniqueAssetId
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Debug for UniqueAssetId
impl Debug for UniqueAssetId
§impl<'de> Deserialize<'de> for UniqueAssetId
impl<'de> Deserialize<'de> for UniqueAssetId
§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 From<&UniqueAssetId> for BigUint
impl From<&UniqueAssetId> for BigUint
§fn from(value: &UniqueAssetId) -> Self
fn from(value: &UniqueAssetId) -> Self
Converts to this type from the input type.
§impl From<&UniqueAssetId> for Nat
impl From<&UniqueAssetId> for Nat
§fn from(value: &UniqueAssetId) -> Self
fn from(value: &UniqueAssetId) -> Self
Converts to this type from the input type.
§impl From<BigUint> for UniqueAssetId
impl From<BigUint> for UniqueAssetId
§impl From<Nat> for UniqueAssetId
impl From<Nat> for UniqueAssetId
§impl From<UniqueAssetId> for BigUint
impl From<UniqueAssetId> for BigUint
§fn from(value: UniqueAssetId) -> Self
fn from(value: UniqueAssetId) -> Self
Converts to this type from the input type.
§impl From<UniqueAssetId> for Nat
impl From<UniqueAssetId> for Nat
§fn from(value: UniqueAssetId) -> Self
fn from(value: UniqueAssetId) -> Self
Converts to this type from the input type.
§impl Ord for UniqueAssetId
impl Ord for UniqueAssetId
§impl PartialEq for UniqueAssetId
impl PartialEq for UniqueAssetId
§fn eq(&self, other: &UniqueAssetId) -> bool
fn eq(&self, other: &UniqueAssetId) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl PartialOrd for UniqueAssetId
impl PartialOrd for UniqueAssetId
§fn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more§impl Serialize for UniqueAssetId
impl Serialize for UniqueAssetId
§impl Storable for UniqueAssetId
impl Storable for UniqueAssetId
§fn from_bytes(bytes: Cow<'_, [u8]>) -> Self
fn from_bytes(bytes: Cow<'_, [u8]>) -> Self
Converts bytes into an element.
§fn to_bytes_checked(&self) -> Cow<'_, [u8]>
fn to_bytes_checked(&self) -> Cow<'_, [u8]>
Like
to_bytes
, but includes additional checks to ensure the element’s serialized bytes
are within the element’s bounds.impl Eq for UniqueAssetId
impl StructuralPartialEq for UniqueAssetId
Auto Trait Implementations§
impl Freeze for UniqueAssetId
impl RefUnwindSafe for UniqueAssetId
impl Send for UniqueAssetId
impl Sync for UniqueAssetId
impl Unpin for UniqueAssetId
impl UnwindSafe for UniqueAssetId
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