pub struct Stroops(/* private fields */);Expand description
Amount in stroops. This is the smallest amount unit.
Implementations§
Source§impl Stroops
impl Stroops
Sourcepub fn checked_add(&self, other: &Stroops) -> Option<Stroops>
pub fn checked_add(&self, other: &Stroops) -> Option<Stroops>
Checked addition. Computes self + other, returning None if overflow occurred.
Sourcepub fn checked_sub(&self, other: &Stroops) -> Option<Stroops>
pub fn checked_sub(&self, other: &Stroops) -> Option<Stroops>
Checked subtraction. Computes self - other, returning None if overflow occurred.
Sourcepub fn checked_mul(&self, other: &Stroops) -> Option<Stroops>
pub fn checked_mul(&self, other: &Stroops) -> Option<Stroops>
Checked multiplication. Computes self * other, returning None if overflow occurred.
Sourcepub fn checked_div(&self, other: &Stroops) -> Option<Stroops>
pub fn checked_div(&self, other: &Stroops) -> Option<Stroops>
Checked division. Computes self / other, returning None if overflow occurred or other == 0.0.
Sourcepub fn checked_rem(&self, other: &Stroops) -> Option<Stroops>
pub fn checked_rem(&self, other: &Stroops) -> Option<Stroops>
Checked division. Computes self % other, returning None if overflow occurred or other == 0.0.
Sourcepub fn to_xdr_int64(&self) -> Result<Int64>
pub fn to_xdr_int64(&self) -> Result<Int64>
Returns stroops amount as xdr object.
Sourcepub fn to_xdr_uint32(&self) -> Result<Uint32>
pub fn to_xdr_uint32(&self) -> Result<Uint32>
Returns stroops amount as xdr object.
Sourcepub fn from_xdr_int64(x: Int64) -> Result<Stroops>
pub fn from_xdr_int64(x: Int64) -> Result<Stroops>
Creates from xdr object.
Sourcepub fn from_xdr_uint32(x: Uint32) -> Result<Stroops>
pub fn from_xdr_uint32(x: Uint32) -> Result<Stroops>
Creates from xdr object.
Trait Implementations§
Source§impl Ord for Stroops
impl Ord for Stroops
Source§impl PartialOrd for Stroops
impl PartialOrd for Stroops
impl Copy for Stroops
impl Eq for Stroops
impl StructuralPartialEq for Stroops
Auto Trait Implementations§
impl Freeze for Stroops
impl RefUnwindSafe for Stroops
impl Send for Stroops
impl Sync for Stroops
impl Unpin for Stroops
impl UnwindSafe for Stroops
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more