[][src]Struct cosmwasm_bignumber::Uint256

pub struct Uint256(pub U256);

Implementations

impl Uint256[src]

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

Creates a Uint256(0)

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

Create a 1.0 Decimal256

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

impl Uint256[src]

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

returns self * nom / denom

Trait Implementations

impl Add<Uint256> for Uint256[src]

type Output = Self

The resulting type after applying the + operator.

impl AddAssign<Uint256> for Uint256[src]

impl Clone for Uint256[src]

impl Copy for Uint256[src]

impl Debug for Uint256[src]

impl Default for Uint256[src]

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

Deserializes as a base64 string

impl Display for Uint256[src]

impl Div<Decimal256> for Uint256[src]

type Output = Self

The resulting type after applying the / operator.

impl Eq for Uint256[src]

impl From<U256> for Uint256[src]

impl From<Uint128> for Uint256[src]

impl From<u128> for Uint256[src]

impl From<u64> for Uint256[src]

impl FromStr for Uint256[src]

type Err = StdError

The associated error which can be returned from parsing.

impl Into<String> for Uint256[src]

impl Into<Uint128> for Uint256[src]

impl Into<u128> for Uint256[src]

impl JsonSchema for Uint256[src]

impl Mul<Decimal256> for Uint256[src]

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

type Output = Self

The resulting type after applying the * operator.

impl Mul<Uint256> for Uint256[src]

type Output = Self

The resulting type after applying the * operator.

impl Mul<Uint256> for Decimal256[src]

type Output = Uint256

The resulting type after applying the * operator.

impl Ord for Uint256[src]

impl PartialEq<Uint256> for Uint256[src]

impl PartialOrd<Uint256> for Uint256[src]

impl Serialize for Uint256[src]

Serializes as a base64 string

impl StructuralEq for Uint256[src]

impl StructuralPartialEq for Uint256[src]

impl Sub<Uint256> for Uint256[src]

type Output = Self

The resulting type after applying the - operator.

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

type Error = StdError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Uint256

impl Send for Uint256

impl Sync for Uint256

impl Unpin for Uint256

impl UnwindSafe for Uint256

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.