Skip to main content

IndicesProvider

Trait IndicesProvider 

Source
pub trait IndicesProvider: ProviderCore {
    // Required method
    fn fetch_indices_quote<'life0, 'life1, 'async_trait>(
        &'life0 self,
        symbol: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<IndexQuote>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided methods
    fn fetch_index_constituents<'life0, 'async_trait>(
        &'life0 self,
        _index: MajorIndex,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<IndexConstituent>>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn fetch_index_constituent_changes<'life0, 'async_trait>(
        &'life0 self,
        _index: MajorIndex,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<IndexConstituentChange>>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

crate::Capability::INDICES — stock market index quotes.

Required Methods§

Source

fn fetch_indices_quote<'life0, 'life1, 'async_trait>( &'life0 self, symbol: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<IndexQuote>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetch a quote for one market index.

Provided Methods§

Source

fn fetch_index_constituents<'life0, 'async_trait>( &'life0 self, _index: MajorIndex, ) -> Pin<Box<dyn Future<Output = Result<Vec<IndexConstituent>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Fetch the current constituents of a major index.

Source

fn fetch_index_constituent_changes<'life0, 'async_trait>( &'life0 self, _index: MajorIndex, ) -> Pin<Box<dyn Future<Output = Result<Vec<IndexConstituentChange>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Fetch historical constituent changes of a major index.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§