[][src]Struct cosmwasm_std::Uint128

pub struct Uint128(pub u128);

Implementations

impl Uint128[src]

pub const fn zero() -> Self[src]

Creates a Uint128(0)

pub fn u128(&self) -> u128[src]

Returns a copy of the internal data

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

impl Uint128[src]

pub fn multiply_ratio<A: Into<u128>, B: Into<u128>>(
    &self,
    nom: A,
    denom: B
) -> Uint128
[src]

returns self * nom / denom

Trait Implementations

impl Add<Uint128> for Uint128[src]

type Output = Self

The resulting type after applying the + operator.

impl AddAssign<Uint128> for Uint128[src]

impl Clone for Uint128[src]

impl Copy for Uint128[src]

impl Debug for Uint128[src]

impl Default for Uint128[src]

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

Deserializes as a base64 string

impl Display for Uint128[src]

impl Eq for Uint128[src]

impl From<u128> for Uint128[src]

impl From<u64> for Uint128[src]

impl Into<String> for Uint128[src]

impl Into<u128> for Uint128[src]

impl JsonSchema for Uint128[src]

impl Mul<Decimal> for Uint128[src]

Both du and ud with d: Decimal and u: Uint128 returns an Uint128. There is no specific reason for this decision other than the initial use cases we have. If you need a Decimal result for the same calculation, use Decimal(du) or Decimal(ud).

type Output = Self

The resulting type after applying the * operator.

impl Mul<Uint128> for Decimal[src]

type Output = Uint128

The resulting type after applying the * operator.

impl Ord for Uint128[src]

impl PartialEq<Uint128> for Uint128[src]

impl PartialOrd<Uint128> for Uint128[src]

impl Serialize for Uint128[src]

Serializes as a base64 string

impl StructuralEq for Uint128[src]

impl StructuralPartialEq for Uint128[src]

impl Sub<Uint128> for Uint128[src]

type Output = StdResult<Self>

The resulting type after applying the - operator.

impl<'_> TryFrom<&'_ str> for Uint128[src]

type Error = StdError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Uint128

impl Send for Uint128

impl Sync for Uint128

impl Unpin for Uint128

impl UnwindSafe for Uint128

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> ToString for T where
    T: Display + ?Sized
[src]

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.