Skip to main content

CalendarProvider

Trait CalendarProvider 

Source
pub trait CalendarProvider: ProviderCore {
    // Required method
    fn fetch_market_calendar<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        kind: CalendarKind,
        from: &'life1 str,
        to: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<MarketCalendarEntry>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

crate::Capability::CALENDAR — market-wide calendars.

Required Methods§

Source

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

Fetch a market-wide calendar over [from, to] (YYYY-MM-DD dates).

One method rather than one per kind — providers serve all kinds from the same calendar family, and kind.operation() still reports the precise Operation in NotSupported errors.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§