Struct coreledger_backend::types::SupplyId
pub struct SupplyId {
pub desired: UniqueAssetId,
pub offered: UniqueAssetId,
pub ext_ref: u32,
pub count: u32,
}
Expand description
Represents globally unique supply identifier.
Is de-/serialized as 32-bytes-long unsigned big integer value, e.g.:
0xF94E2AD9DD5CBBC0414300015268793722DE5FE1639D00010000000F0000002A
112_764_009_115_253_201_425_820_669_109_046_585_487_817_995_790_098_821_694_237_981_920_636_725_887_018
Fields§
§desired: UniqueAssetId
Unique if of the desired asset.
offered: UniqueAssetId
Unique if of the offered asset.
ext_ref: u32
Value for referencing by external cosumers.
count: u32
Ordinal number of the supply.
Implementations§
§impl SupplyId
impl SupplyId
pub fn new( desired: UniqueAssetId, offered: UniqueAssetId, ext_ref: u32, count: u32 ) -> Self
Trait Implementations§
§impl<'de> Deserialize<'de> for SupplyId
impl<'de> Deserialize<'de> for SupplyId
§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 Ord for SupplyId
impl Ord for SupplyId
§impl PartialOrd for SupplyId
impl PartialOrd for SupplyId
§fn partial_cmp(&self, other: &SupplyId) -> Option<Ordering>
fn partial_cmp(&self, other: &SupplyId) -> 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 Storable for SupplyId
impl Storable for SupplyId
§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 SupplyId
impl StructuralPartialEq for SupplyId
Auto Trait Implementations§
impl Freeze for SupplyId
impl RefUnwindSafe for SupplyId
impl Send for SupplyId
impl Sync for SupplyId
impl Unpin for SupplyId
impl UnwindSafe for SupplyId
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