Skip to main content

ForexProvider

Trait ForexProvider 

Source
pub trait ForexProvider: ProviderCore {
    // Required method
    fn fetch_forex_quote<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        from: &'life1 str,
        to: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<ForexQuote>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;

    // Provided method
    fn fetch_forex_news<'life0, 'async_trait>(
        &'life0 self,
        _limit: u32,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<News>>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

crate::Capability::FOREX — currency-pair quotes.

Required Methods§

Source

fn fetch_forex_quote<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, from: &'life1 str, to: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<ForexQuote>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Fetch the exchange rate for one currency pair.

Provided Methods§

Source

fn fetch_forex_news<'life0, 'async_trait>( &'life0 self, _limit: u32, ) -> Pin<Box<dyn Future<Output = Result<Vec<News>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Fetch market-wide forex news, newest first.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§