pub struct ExtraCurrencyCollection(/* private fields */);Expand description
Dictionary with amounts for multiple currencies.
Implementations§
Source§impl ExtraCurrencyCollection
impl ExtraCurrencyCollection
Sourcepub const fn from_raw(dict: Option<Cell>) -> Self
pub const fn from_raw(dict: Option<Cell>) -> Self
Creates a currency collection from a raw cell.
Sourcepub const fn as_dict(&self) -> &Dict<u32, VarUint248>
pub const fn as_dict(&self) -> &Dict<u32, VarUint248>
Returns a reference to the underlying dictionary.
Sourcepub fn as_dict_mut(&mut self) -> &mut Dict<u32, VarUint248>
pub fn as_dict_mut(&mut self) -> &mut Dict<u32, VarUint248>
Returns a mutable reference to the underlying dictionary.
Sourcepub fn checked_add(&self, other: &Self) -> Result<Self, Error>
pub fn checked_add(&self, other: &Self) -> Result<Self, Error>
Checked extra currency collection addition.
Computes self + rhs for each currency, returning Err
if overflow occurred or dictionaries had invalid structure.
Sourcepub fn checked_sub(&self, other: &Self) -> Result<Self, Error>
pub fn checked_sub(&self, other: &Self) -> Result<Self, Error>
Checked extra currency subtraction.
Computes self - rhs for each currency, returning Err
if overflow occurred or dictionaries had invalid structure.
Trait Implementations§
Source§impl Clone for ExtraCurrencyCollection
impl Clone for ExtraCurrencyCollection
Source§fn clone(&self) -> ExtraCurrencyCollection
fn clone(&self) -> ExtraCurrencyCollection
Returns a duplicate 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 moreSource§impl Debug for ExtraCurrencyCollection
impl Debug for ExtraCurrencyCollection
Source§impl Default for ExtraCurrencyCollection
impl Default for ExtraCurrencyCollection
Source§impl<'de> Deserialize<'de> for ExtraCurrencyCollection
impl<'de> Deserialize<'de> for ExtraCurrencyCollection
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
Source§impl ExactSize for ExtraCurrencyCollection
impl ExactSize for ExtraCurrencyCollection
Source§fn exact_size(&self) -> Size
fn exact_size(&self) -> Size
Exact size of the value when it is stored in a slice.
Source§impl From<Dict<u32, VarUint248>> for ExtraCurrencyCollection
impl From<Dict<u32, VarUint248>> for ExtraCurrencyCollection
Source§impl<'tlb> Load<'tlb> for ExtraCurrencyCollection
impl<'tlb> Load<'tlb> for ExtraCurrencyCollection
Source§impl PartialEq for ExtraCurrencyCollection
impl PartialEq for ExtraCurrencyCollection
Source§impl Serialize for ExtraCurrencyCollection
impl Serialize for ExtraCurrencyCollection
Source§impl Store for ExtraCurrencyCollection
impl Store for ExtraCurrencyCollection
Source§fn store_into(
&self,
__builder: &mut CellBuilder,
__context: &mut dyn CellContext,
) -> Result<(), Error>
fn store_into( &self, __builder: &mut CellBuilder, __context: &mut dyn CellContext, ) -> Result<(), Error>
Tries to store itself into the cell builder.
impl Eq for ExtraCurrencyCollection
impl StructuralPartialEq for ExtraCurrencyCollection
Auto Trait Implementations§
impl Freeze for ExtraCurrencyCollection
impl !RefUnwindSafe for ExtraCurrencyCollection
impl Send for ExtraCurrencyCollection
impl Sync for ExtraCurrencyCollection
impl Unpin for ExtraCurrencyCollection
impl !UnwindSafe for ExtraCurrencyCollection
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,
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
Compares
self to key and returns true if they are equal.