[][src]Struct sn_data_types::Money

pub struct Money(_);

Structure representing a safeMoney amount.

Implementations

impl Money[src]

pub const fn zero() -> Self[src]

Type safe representation of zero Money.

pub const fn from_nano(value: u64) -> Self[src]

New value from a number of nano Money.

pub const fn as_nano(self) -> u64[src]

Total Money expressed in number of nano Money.

pub fn checked_add(self, rhs: Money) -> Option<Money>[src]

Computes self + rhs, returning None if overflow occurred.

pub fn checked_sub(self, rhs: Money) -> Option<Money>[src]

Computes self - rhs, returning None if overflow occurred.

Trait Implementations

impl Clone for Money[src]

impl Copy for Money[src]

impl Debug for Money[src]

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

impl Display for Money[src]

impl Eq for Money[src]

impl FromStr for Money[src]

type Err = Error

The associated error which can be returned from parsing.

impl Hash for Money[src]

impl Ord for Money[src]

impl PartialEq<Money> for Money[src]

impl PartialOrd<Money> for Money[src]

impl Serialize for Money[src]

impl StructuralEq for Money[src]

impl StructuralPartialEq for Money[src]

impl TryFrom<QueryResponse> for Money[src]

type Error = TryFromError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Money

impl Send for Money

impl Sync for Money

impl Unpin for Money

impl UnwindSafe for Money

Blanket Implementations

impl<A> Actor for A where
    A: Clone + Ord + Hash
[src]

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<T> From<T> for T[src]

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

impl<T> Member for T where
    T: Clone + Eq + Hash
[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>,