[−][src]Struct stellar_base::amount::Stroops
Amount in stroops. This is the smallest amount unit.
Implementations
impl Stroops
[src]
pub fn new(amount: i64) -> Stroops
[src]
Creates with stroops amount.
pub fn max() -> Stroops
[src]
Creates with maximum amount of stroops.
pub fn to_i64(&self) -> i64
[src]
Returns the stroops amount as i64
.
pub fn checked_add(&self, other: &Stroops) -> Option<Stroops>
[src]
Checked addition. Computes self + other
, returning None if overflow occurred.
pub fn checked_sub(&self, other: &Stroops) -> Option<Stroops>
[src]
Checked subtraction. Computes self - other
, returning None if overflow occurred.
pub fn checked_mul(&self, other: &Stroops) -> Option<Stroops>
[src]
Checked multiplication. Computes self * other
, returning None if overflow occurred.
pub fn checked_div(&self, other: &Stroops) -> Option<Stroops>
[src]
Checked division. Computes self / other
, returning None if overflow occurred or other == 0.0
.
pub fn checked_rem(&self, other: &Stroops) -> Option<Stroops>
[src]
Checked division. Computes self % other
, returning None if overflow occurred or other == 0.0
.
pub fn to_xdr_int64(&self) -> Result<Int64>
[src]
Returns stroops amount as xdr object.
pub fn to_xdr_uint32(&self) -> Result<Uint32>
[src]
Returns stroops amount as xdr object.
pub fn from_xdr_int64(x: &Int64) -> Result<Stroops>
[src]
Creates from xdr object.
pub fn from_xdr_uint32(x: &Uint32) -> Result<Stroops>
[src]
Creates from xdr object.
Trait Implementations
impl Clone for Stroops
[src]
impl Copy for Stroops
[src]
impl Debug for Stroops
[src]
impl Eq for Stroops
[src]
impl Ord for Stroops
[src]
fn cmp(&self, other: &Stroops) -> 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<Stroops> for Stroops
[src]
impl PartialOrd<Stroops> for Stroops
[src]
fn partial_cmp(&self, other: &Stroops) -> Option<Ordering>
[src]
fn lt(&self, other: &Stroops) -> bool
[src]
fn le(&self, other: &Stroops) -> bool
[src]
fn gt(&self, other: &Stroops) -> bool
[src]
fn ge(&self, other: &Stroops) -> bool
[src]
impl StructuralEq for Stroops
[src]
impl StructuralPartialEq for Stroops
[src]
impl TryFrom<Amount> for Stroops
[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(amount: Amount) -> Result<Self, Self::Error>
[src]
impl TryFrom<Stroops> for Amount
[src]
Auto Trait Implementations
impl RefUnwindSafe for Stroops
impl Send for Stroops
impl Sync for Stroops
impl Unpin for Stroops
impl UnwindSafe for Stroops
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> 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, 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>,