[][src]Struct cw0::NativeBalance

pub struct NativeBalance(pub Vec<Coin>);

Implementations

impl NativeBalance[src]

pub fn into_vec(self) -> Vec<Coin>[src]

pub fn has(&self, required: &Coin) -> bool[src]

returns true if the list of coins has at least the required amount

pub fn normalize(&mut self)[src]

normalize Wallet (sorted by denom, no 0 elements, no duplicate denoms)

pub fn is_empty(&self) -> bool[src]

pub fn sub_saturating(self, other: Coin) -> StdResult<Self>[src]

similar to Balance.sub, but doesn't fail when minuend less than subtrahend

Trait Implementations

impl Add<Coin> for NativeBalance[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<NativeBalance> for NativeBalance[src]

type Output = Self

The resulting type after applying the + operator.

impl AddAssign<Coin> for NativeBalance[src]

impl AddAssign<NativeBalance> for NativeBalance[src]

impl Clone for NativeBalance[src]

impl Debug for NativeBalance[src]

impl Default for NativeBalance[src]

impl<'de> Deserialize<'de> for NativeBalance[src]

impl JsonSchema for NativeBalance[src]

impl PartialEq<NativeBalance> for NativeBalance[src]

impl Serialize for NativeBalance[src]

impl StructuralPartialEq for NativeBalance[src]

impl Sub<Coin> for NativeBalance[src]

type Output = StdResult<Self>

The resulting type after applying the - operator.

impl Sub<Vec<Coin, Global>> for NativeBalance[src]

type Output = StdResult<Self>

The resulting type after applying the - operator.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.