[][src]Struct monet::CurrencyAmount

pub struct CurrencyAmount(_);

Holds an amount of currency. The i128 it holds is expressed in fractions of a unit. CurrencyAmount(AMOUNT_UNIT) makes a unit.

Methods

impl CurrencyAmount[src]

pub fn with_unit(unit: i128) -> Self[src]

pub fn with_tenths(tenths: i128) -> Self[src]

pub fn with_cents(cents: i128) -> Self[src]

pub fn with_thousands(thousands: i128) -> Self[src]

pub fn into_unit(self) -> Self[src]

pub fn into_tenths(self) -> Self[src]

pub fn into_cents(self) -> Self[src]

pub fn into_thousands(self) -> Self[src]

Trait Implementations

impl From<i128> for CurrencyAmount[src]

impl From<CurrencyAmount> for i128[src]

impl Clone for CurrencyAmount[src]

impl Copy for CurrencyAmount[src]

impl Default for CurrencyAmount[src]

impl Eq for CurrencyAmount[src]

impl PartialEq<CurrencyAmount> for CurrencyAmount[src]

impl Debug for CurrencyAmount[src]

impl Div<CurrencyAmount> for CurrencyAmount[src]

type Output = Self

The resulting type after applying the / operator.

impl Sub<CurrencyAmount> for CurrencyAmount[src]

type Output = Self

The resulting type after applying the - operator.

impl Add<CurrencyAmount> for CurrencyAmount[src]

type Output = Self

The resulting type after applying the + operator.

impl Mul<CurrencyAmount> for CurrencyAmount[src]

type Output = Self

The resulting type after applying the * operator.

impl Deref for CurrencyAmount[src]

type Target = i128

The resulting type after dereferencing.

impl StructuralPartialEq for CurrencyAmount[src]

impl StructuralEq for CurrencyAmount[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]