[][src]Struct snarkos_objects::amount::AleoAmount

pub struct AleoAmount(pub i64);

Represents the amount of ALEOs in UNITS

Implementations

impl AleoAmount[src]

pub const COIN: i64[src]

Number of AB (base unit) per ALEO

pub const ONE_ALEO: AleoAmount[src]

Exactly one ALEO.

pub const ONE_BYTE: AleoAmount[src]

Exactly one byte.

pub const ZERO: AleoAmount[src]

The zero amount.

pub fn from_bytes(bytes: i64) -> Self[src]

Create an AleoAmount given a number of bytes

pub fn from_gates(gate_value: i64) -> Self[src]

Create an AleoAmount given a number of gates

pub fn from_aleo(aleo_value: i64) -> Self[src]

Create an AleoAmount given a number of ALEOs

pub fn add(self, b: Self) -> Self[src]

Add the values of two AleoAmounts

pub fn sub(self, b: AleoAmount) -> Self[src]

Subtract the value of two AleoAmounts

pub const fn is_positive(self) -> bool[src]

Returns true the amount is positive and false if the amount is zero or negative.

pub const fn is_negative(self) -> bool[src]

Returns true if the amount is negative and false if the amount is zero or positive.

Trait Implementations

impl Clone for AleoAmount[src]

impl Copy for AleoAmount[src]

impl Debug for AleoAmount[src]

impl Display for AleoAmount[src]

impl Eq for AleoAmount[src]

impl FromBytes for AleoAmount[src]

impl Hash for AleoAmount[src]

impl Ord for AleoAmount[src]

impl PartialEq<AleoAmount> for AleoAmount[src]

impl PartialOrd<AleoAmount> for AleoAmount[src]

impl Serialize for AleoAmount[src]

impl StructuralEq for AleoAmount[src]

impl StructuralPartialEq for AleoAmount[src]

impl ToBytes for AleoAmount[src]

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> 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<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.

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