[][src]Struct ergo_lib::chain::token::TokenAmount

pub struct TokenAmount(_);

Token amount with bound checks

Implementations

impl TokenAmount[src]

pub const MIN_RAW: u64[src]

minimal allowed value

pub const MAX_RAW: u64[src]

maximal allowed value

pub fn checked_add(&self, rhs: &Self) -> Result<Self, TokenAmountError>[src]

Addition with overflow check

pub fn checked_sub(&self, rhs: &Self) -> Result<Self, TokenAmountError>[src]

Subtraction with overflow and bounds check

Trait Implementations

impl Clone for TokenAmount[src]

impl Copy for TokenAmount[src]

impl Debug for TokenAmount[src]

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

impl Eq for TokenAmount[src]

impl Hash for TokenAmount[src]

impl Ord for TokenAmount[src]

impl PartialEq<TokenAmount> for TokenAmount[src]

impl PartialOrd<TokenAmount> for TokenAmount[src]

impl Serialize for TokenAmount[src]

impl StructuralEq for TokenAmount[src]

impl StructuralPartialEq for TokenAmount[src]

impl TryFrom<u64> for TokenAmount[src]

type Error = TokenAmountError

The type returned in the event of a conversion error.

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<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

impl<F> TryExtractInto<F> for F[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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,