[][src]Struct investments::currency::converter::CurrencyConverter

pub struct CurrencyConverter { /* fields omitted */ }

Implementations

impl CurrencyConverter[src]

pub fn new(
    database: Connection,
    quotes: Option<Rc<Quotes>>,
    strict_mode: bool
) -> CurrencyConverter
[src]

pub fn new_with_backend(
    source: Box<dyn CurrencyConverterBackend>
) -> CurrencyConverter
[src]

pub fn currency_rate(
    &self,
    date: Date,
    from: &str,
    to: &str
) -> GenericResult<Decimal>
[src]

pub fn real_time_currency_rate(
    &self,
    from: &str,
    to: &str
) -> GenericResult<Decimal>
[src]

pub fn precise_currency_rate(
    &self,
    date: Date,
    from: &str,
    to: &str
) -> GenericResult<Decimal>
[src]

Returns non-rounded currency rate. CBR provides currency rates with high precision like 56.3438 and tax statement uses currency rate value for 100 units like 5634.38.

pub fn convert_to(
    &self,
    date: Date,
    cash: Cash,
    to: &str
) -> GenericResult<Decimal>
[src]

pub fn real_time_convert_to(
    &self,
    cash: Cash,
    to: &str
) -> GenericResult<Decimal>
[src]

pub fn convert_to_rounding(
    &self,
    date: Date,
    cash: Cash,
    to: &str
) -> GenericResult<Decimal>
[src]

pub fn convert_to_cash_rounding(
    &self,
    date: Date,
    cash: Cash,
    to: &str
) -> GenericResult<Cash>
[src]

pub fn convert_to_cash(
    &self,
    date: Date,
    cash: Cash,
    to: &str
) -> GenericResult<Cash>
[src]

pub fn convert(
    &self,
    from: &str,
    to: &str,
    date: Date,
    amount: Decimal
) -> GenericResult<Decimal>
[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> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> IntoSql for T[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

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>,