pub struct CoinBalances(/* private fields */);Expand description
The CoinBalances struct is a collection of CoinBalance objects.
Implementations§
Source§impl CoinBalances
impl CoinBalances
pub fn new() -> Self
pub fn single(coin: CoinBalance) -> Self
pub fn is_empty(&self) -> bool
pub fn iter(&self) -> impl Iterator<Item = &CoinBalance>
pub fn add_coin(&mut self, coin: &CoinBalance)
pub fn subtract_coin(&mut self, coin: &CoinBalance) -> bool
pub fn value_of(&self, coin_id: &CoinId) -> u128
pub fn add_coins(&mut self, coins: &CoinBalances)
Trait Implementations§
Source§impl CandidType for CoinBalances
impl CandidType for CoinBalances
Source§impl Clone for CoinBalances
impl Clone for CoinBalances
Source§fn clone(&self) -> CoinBalances
fn clone(&self) -> CoinBalances
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 CoinBalances
impl Debug for CoinBalances
Source§impl Default for CoinBalances
impl Default for CoinBalances
Source§fn default() -> CoinBalances
fn default() -> CoinBalances
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CoinBalances
impl<'de> Deserialize<'de> for CoinBalances
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 PartialEq for CoinBalances
impl PartialEq for CoinBalances
Source§impl Serialize for CoinBalances
impl Serialize for CoinBalances
impl Eq for CoinBalances
impl StructuralPartialEq for CoinBalances
Auto Trait Implementations§
impl Freeze for CoinBalances
impl RefUnwindSafe for CoinBalances
impl Send for CoinBalances
impl Sync for CoinBalances
impl Unpin for CoinBalances
impl UnwindSafe for CoinBalances
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