Skip to main content

CorporateProvider

Trait CorporateProvider 

Source
pub trait CorporateProvider: ProviderCore {
    // Required methods
    fn fetch_news<'life0, 'life1, 'async_trait>(
        &'life0 self,
        symbol: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<News>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn fetch_events<'life0, 'life1, 'async_trait>(
        &'life0 self,
        symbol: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<ChartEvents>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided methods
    fn fetch_similar_symbols<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _symbol: &'life1 str,
        _limit: u32,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<SimilarSymbol>>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn fetch_press_releases<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _symbol: &'life1 str,
        _limit: u32,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<PressRelease>>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn fetch_earnings_transcript<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        _symbol: &'life1 str,
        _quarter: Option<&'life2 str>,
        _year: Option<i32>,
    ) -> Pin<Box<dyn Future<Output = Result<EarningsTranscript>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
    fn fetch_executive_compensation<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _symbol: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ExecutiveCompensation>>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn fetch_employee_count<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _symbol: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<EmployeeCount>>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
Expand description

crate::Capability::CORPORATE — news, corporate events, similar-symbol recommendations.

Required Methods§

Source

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

Fetch recent news articles mentioning one symbol.

Source

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

Fetch dividends, splits, and capital gains for one symbol.

Provided Methods§

Source

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

Symbols this provider considers comparable to symbol.

Source

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

Fetch the company’s own press releases.

Source

fn fetch_earnings_transcript<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _symbol: &'life1 str, _quarter: Option<&'life2 str>, _year: Option<i32>, ) -> Pin<Box<dyn Future<Output = Result<EarningsTranscript>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Fetch an earnings call transcript, provider-neutral shape. quarter and year narrow to a specific call; a provider with no “latest” shortcut requires both.

Source

fn fetch_executive_compensation<'life0, 'life1, 'async_trait>( &'life0 self, _symbol: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<ExecutiveCompensation>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetch reported executive compensation, most recent fiscal year first.

Source

fn fetch_employee_count<'life0, 'life1, 'async_trait>( &'life0 self, _symbol: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<EmployeeCount>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetch reported employee headcount history, most recent period first.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§