Struct cw_utils::NativeBalance
source · [−]Tuple Fields
0: Vec<Coin>
Implementations
sourceimpl NativeBalance
impl NativeBalance
pub fn into_vec(self) -> Vec<Coin>
sourcepub fn has(&self, required: &Coin) -> bool
pub fn has(&self, required: &Coin) -> bool
returns true if the list of coins has at least the required amount
sourcepub fn normalize(&mut self)
pub fn normalize(&mut self)
normalize Wallet (sorted by denom, no 0 elements, no duplicate denoms)
pub fn is_empty(&self) -> bool
sourcepub fn sub_saturating(self, other: Coin) -> StdResult<Self>
pub fn sub_saturating(self, other: Coin) -> StdResult<Self>
similar to Balance.sub
, but doesn’t fail when minuend less than subtrahend
Trait Implementations
sourceimpl Add<Coin> for NativeBalance
impl Add<Coin> for NativeBalance
sourceimpl Add<NativeBalance> for NativeBalance
impl Add<NativeBalance> for NativeBalance
type Output = NativeBalance
type Output = NativeBalance
The resulting type after applying the
+
operator.sourcefn add(self, other: NativeBalance) -> Self
fn add(self, other: NativeBalance) -> Self
Performs the
+
operation. Read moresourceimpl AddAssign<Coin> for NativeBalance
impl AddAssign<Coin> for NativeBalance
sourcefn add_assign(&mut self, other: Coin)
fn add_assign(&mut self, other: Coin)
Performs the
+=
operation. Read moresourceimpl AddAssign<NativeBalance> for NativeBalance
impl AddAssign<NativeBalance> for NativeBalance
sourcefn add_assign(&mut self, other: NativeBalance)
fn add_assign(&mut self, other: NativeBalance)
Performs the
+=
operation. Read moresourceimpl Clone for NativeBalance
impl Clone for NativeBalance
sourcefn clone(&self) -> NativeBalance
fn clone(&self) -> NativeBalance
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for NativeBalance
impl Debug for NativeBalance
sourceimpl Default for NativeBalance
impl Default for NativeBalance
sourcefn default() -> NativeBalance
fn default() -> NativeBalance
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for NativeBalance
impl<'de> Deserialize<'de> for NativeBalance
sourcefn 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
sourceimpl Display for NativeBalance
impl Display for NativeBalance
sourceimpl JsonSchema for NativeBalance
impl JsonSchema for NativeBalance
sourcefn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
sourcefn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
sourcefn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresourceimpl PartialEq<NativeBalance> for NativeBalance
impl PartialEq<NativeBalance> for NativeBalance
sourcefn eq(&self, other: &NativeBalance) -> bool
fn eq(&self, other: &NativeBalance) -> bool
sourceimpl Serialize for NativeBalance
impl Serialize for NativeBalance
sourceimpl Sub<Coin> for NativeBalance
impl Sub<Coin> for NativeBalance
impl StructuralPartialEq for NativeBalance
Auto Trait Implementations
impl RefUnwindSafe for NativeBalance
impl Send for NativeBalance
impl Sync for NativeBalance
impl Unpin for NativeBalance
impl UnwindSafe for NativeBalance
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more