Skip to main content

EconomicProvider

Trait EconomicProvider 

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

    // Provided methods
    fn fetch_economic_series_as_of<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        _series_id: &'life1 str,
        _date: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<EconomicSeries>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
    fn fetch_economic_search<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _query: &'life1 str,
        _limit: u32,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<EconomicSeriesMatch>>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn fetch_economic_categories<'life0, 'async_trait>(
        &'life0 self,
        _parent_id: i64,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<EconomicCategory>>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn fetch_economic_releases<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<EconomicRelease>>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

crate::Capability::ECONOMIC — macro-economic data series.

Required Methods§

Source

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

Fetch observations for one macro-economic series.

Provided Methods§

Source

fn fetch_economic_series_as_of<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _series_id: &'life1 str, _date: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<EconomicSeries>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Fetch a series as it stood on date (YYYY-MM-DD) rather than as currently revised — the point-in-time view backtests need.

NOTE: this vintage/realtime-window concept is unique to FRED/ALFRED among the providers integrated here — WorldBank, FiscalData, and BLS all serve only the latest value per period, with no revision history. Stays FRED-only.

Search the provider’s series catalog by free text.

NOTE: WorldBank and BLS treat series ids as opaque, live-validated strings with no local catalog; FiscalData carries only 7 curated series. None is a meaningful substitute for FRED’s live full-text search over its ~800k series, so this stays FRED-only.

Source

fn fetch_economic_categories<'life0, 'async_trait>( &'life0 self, _parent_id: i64, ) -> Pin<Box<dyn Future<Output = Result<Vec<EconomicCategory>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

List the child categories of parent_id in the series category tree.

NOTE: none of WorldBank/FiscalData/BLS models a category/topic tree in this crate. Stays FRED-only.

Source

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

List the provider’s scheduled data releases.

NOTE: no keyless provider integrated here models a scheduled-release entity. Stays FRED-only.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§