[−][src]Struct snarkos_objects::amount::AleoAmount
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 AleoAmount
s
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]
fn clone(&self) -> AleoAmount
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for AleoAmount
[src]
fn cmp(&self, other: &AleoAmount) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<AleoAmount> for AleoAmount
[src]
fn eq(&self, other: &AleoAmount) -> bool
[src]
fn ne(&self, other: &AleoAmount) -> bool
[src]
impl PartialOrd<AleoAmount> for AleoAmount
[src]
fn partial_cmp(&self, other: &AleoAmount) -> Option<Ordering>
[src]
fn lt(&self, other: &AleoAmount) -> bool
[src]
fn le(&self, other: &AleoAmount) -> bool
[src]
fn gt(&self, other: &AleoAmount) -> bool
[src]
fn ge(&self, other: &AleoAmount) -> bool
[src]
impl Serialize for AleoAmount
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for AleoAmount
[src]
impl StructuralPartialEq for AleoAmount
[src]
impl ToBytes for AleoAmount
[src]
Auto Trait Implementations
impl RefUnwindSafe for AleoAmount
impl Send for AleoAmount
impl Sync for AleoAmount
impl Unpin for AleoAmount
impl UnwindSafe for AleoAmount
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,