Struct argent::Amount [] [src]

pub struct Amount<'a> {
    pub currency: &'a Currency,
    pub quantity: i64,
}

Fields

currency: &'a Currency quantity: i64

Methods

impl<'a> Amount<'a>
[src]

fn of(currency: &'a Currency, quantity: i64) -> Amount<'a>

Trait Implementations

impl<'a> Clone for Amount<'a>
[src]

fn clone(&self) -> Amount<'a>

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl<'a> Debug for Amount<'a>
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<'a> Display for Amount<'a>
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<'a> Add for Amount<'a>
[src]

type Output = Amount<'a>

The resulting type after applying the + operator

fn add(self, rhs: Amount) -> Amount<'a>

The method for the + operator

impl<'a> Sub for Amount<'a>
[src]

type Output = Amount<'a>

The resulting type after applying the - operator

fn sub(self, rhs: Amount) -> Amount<'a>

The method for the - operator