[][src]Struct rusty_money::Exchange

pub struct Exchange { /* fields omitted */ }

Stores a collection of exchange rates pairs between currencies.

Methods

impl Exchange[src]

pub fn new() -> Exchange[src]

pub fn add_or_update_rate(&mut self, rate: &ExchangeRate)[src]

Update an ExchangeRate or add it if does not exist.

pub fn get_rate(
    self,
    from: &'static Currency,
    to: &'static Currency
) -> Option<ExchangeRate>
[src]

Return the ExchangeRate given the currency pair.

Trait Implementations

impl Debug for Exchange[src]

impl Default for Exchange[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.