Trait finql_data::currency::CurrencyConverter[][src]

pub trait CurrencyConverter {
#[must_use]    fn fx_rate<'life0, 'async_trait>(
        &'life0 mut self,
        foreign_currency: Currency,
        domestic_currency: Currency,
        time: DateTime<Utc>
    ) -> Pin<Box<dyn Future<Output = Result<f64, CurrencyError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }

Trait for calculating FX rates for currency conversion

Required methods

#[must_use]fn fx_rate<'life0, 'async_trait>(
    &'life0 mut self,
    foreign_currency: Currency,
    domestic_currency: Currency,
    time: DateTime<Utc>
) -> Pin<Box<dyn Future<Output = Result<f64, CurrencyError>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

returns the price of 1 unit of foreign currency in terms of domestic currency

Loading content...

Implementors

impl CurrencyConverter for dyn QuoteHandler + Send[src]

Loading content...