pub struct MockConnector;Expand description
Mock connector for CI-safe examples. Provides deterministic data from static fixtures.
Implementations§
Source§impl MockConnector
impl MockConnector
Trait Implementations§
Source§impl AnalystPriceTargetProvider for MockConnector
impl AnalystPriceTargetProvider for MockConnector
Source§fn analyst_price_target<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument: &'life1 Instrument,
) -> Pin<Box<dyn Future<Output = Result<PriceTarget, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn analyst_price_target<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument: &'life1 Instrument,
) -> Pin<Box<dyn Future<Output = Result<PriceTarget, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch the current analyst price target for the given instrument.
Source§impl BalanceSheetProvider for MockConnector
impl BalanceSheetProvider for MockConnector
Source§fn balance_sheet<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument: &'life1 Instrument,
_q: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<BalanceSheetRow>, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn balance_sheet<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument: &'life1 Instrument,
_q: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<BalanceSheetRow>, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch balance sheet rows for the given instrument.
Source§impl BorsaConnector for MockConnector
impl BorsaConnector for MockConnector
Source§fn name(&self) -> &'static str
fn name(&self) -> &'static str
A stable identifier for priority lists (e.g., “borsa-yfinance”, “borsa-coinmarketcap”).
Source§fn supports_kind(&self, _kind: AssetKind) -> bool
fn supports_kind(&self, _kind: AssetKind) -> bool
Whether this connector claims to support a given asset kind. Read more
Source§fn as_quote_provider(&self) -> Option<&dyn QuoteProvider>
fn as_quote_provider(&self) -> Option<&dyn QuoteProvider>
Advertise quote capability by returning a usable trait object reference when supported.
Source§fn as_history_provider(&self) -> Option<&dyn HistoryProvider>
fn as_history_provider(&self) -> Option<&dyn HistoryProvider>
Advertise history capability by returning a usable trait object reference when supported.
Source§fn as_search_provider(&self) -> Option<&dyn SearchProvider>
fn as_search_provider(&self) -> Option<&dyn SearchProvider>
If implemented, returns a trait object for instrument search.
Source§fn as_profile_provider(&self) -> Option<&dyn ProfileProvider>
fn as_profile_provider(&self) -> Option<&dyn ProfileProvider>
If implemented, returns a trait object for company profiles.
Source§fn as_earnings_provider(&self) -> Option<&dyn EarningsProvider>
fn as_earnings_provider(&self) -> Option<&dyn EarningsProvider>
If implemented, returns a trait object for earnings fundamentals.
Source§fn as_income_statement_provider(&self) -> Option<&dyn IncomeStatementProvider>
fn as_income_statement_provider(&self) -> Option<&dyn IncomeStatementProvider>
If implemented, returns a trait object for income statements.
Source§fn as_balance_sheet_provider(&self) -> Option<&dyn BalanceSheetProvider>
fn as_balance_sheet_provider(&self) -> Option<&dyn BalanceSheetProvider>
If implemented, returns a trait object for balance sheets.
Source§fn as_cashflow_provider(&self) -> Option<&dyn CashflowProvider>
fn as_cashflow_provider(&self) -> Option<&dyn CashflowProvider>
If implemented, returns a trait object for cashflow statements.
Source§fn as_calendar_provider(&self) -> Option<&dyn CalendarProvider>
fn as_calendar_provider(&self) -> Option<&dyn CalendarProvider>
If implemented, returns a trait object for the fundamentals calendar.
Source§fn as_options_expirations_provider(
&self,
) -> Option<&dyn OptionsExpirationsProvider>
fn as_options_expirations_provider( &self, ) -> Option<&dyn OptionsExpirationsProvider>
If implemented, returns a trait object for options expirations.
Source§fn as_option_chain_provider(&self) -> Option<&dyn OptionChainProvider>
fn as_option_chain_provider(&self) -> Option<&dyn OptionChainProvider>
If implemented, returns a trait object for option chains.
Source§fn as_recommendations_provider(&self) -> Option<&dyn RecommendationsProvider>
fn as_recommendations_provider(&self) -> Option<&dyn RecommendationsProvider>
If implemented, returns a trait object for analyst recommendations.
Source§fn as_recommendations_summary_provider(
&self,
) -> Option<&dyn RecommendationsSummaryProvider>
fn as_recommendations_summary_provider( &self, ) -> Option<&dyn RecommendationsSummaryProvider>
If implemented, returns a trait object for recommendations summary.
Source§fn as_upgrades_downgrades_provider(
&self,
) -> Option<&dyn UpgradesDowngradesProvider>
fn as_upgrades_downgrades_provider( &self, ) -> Option<&dyn UpgradesDowngradesProvider>
If implemented, returns a trait object for upgrades/downgrades.
Source§fn as_analyst_price_target_provider(
&self,
) -> Option<&dyn AnalystPriceTargetProvider>
fn as_analyst_price_target_provider( &self, ) -> Option<&dyn AnalystPriceTargetProvider>
If implemented, returns a trait object for analyst price targets.
Source§fn as_esg_provider(&self) -> Option<&dyn EsgProvider>
fn as_esg_provider(&self) -> Option<&dyn EsgProvider>
If implemented, returns a trait object for ESG scores.
Source§fn as_news_provider(&self) -> Option<&dyn NewsProvider>
fn as_news_provider(&self) -> Option<&dyn NewsProvider>
If implemented, returns a trait object for news articles.
Source§fn key(&self) -> ConnectorKey
fn key(&self) -> ConnectorKey
Canonical connector key constructed from the static name. Read more
Source§fn as_major_holders_provider(&self) -> Option<&dyn MajorHoldersProvider>
fn as_major_holders_provider(&self) -> Option<&dyn MajorHoldersProvider>
If implemented, returns a trait object for major holders.
Source§fn as_institutional_holders_provider(
&self,
) -> Option<&dyn InstitutionalHoldersProvider>
fn as_institutional_holders_provider( &self, ) -> Option<&dyn InstitutionalHoldersProvider>
If implemented, returns a trait object for institutional holders.
Source§fn as_mutual_fund_holders_provider(
&self,
) -> Option<&dyn MutualFundHoldersProvider>
fn as_mutual_fund_holders_provider( &self, ) -> Option<&dyn MutualFundHoldersProvider>
If implemented, returns a trait object for mutual fund holders.
Source§fn as_insider_transactions_provider(
&self,
) -> Option<&dyn InsiderTransactionsProvider>
fn as_insider_transactions_provider( &self, ) -> Option<&dyn InsiderTransactionsProvider>
If implemented, returns a trait object for insider transactions.
Source§fn as_insider_roster_holders_provider(
&self,
) -> Option<&dyn InsiderRosterHoldersProvider>
fn as_insider_roster_holders_provider( &self, ) -> Option<&dyn InsiderRosterHoldersProvider>
If implemented, returns a trait object for insider roster holders.
If implemented, returns a trait object for net share purchase activity.
Source§fn as_isin_provider(&self) -> Option<&dyn IsinProvider>
fn as_isin_provider(&self) -> Option<&dyn IsinProvider>
If implemented, returns a trait object for ISIN lookup.
Source§fn as_stream_provider(&self) -> Option<&dyn StreamProvider>
fn as_stream_provider(&self) -> Option<&dyn StreamProvider>
If implemented, returns a trait object for quote streaming.
Source§impl CalendarProvider for MockConnector
impl CalendarProvider for MockConnector
Source§fn calendar<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument: &'life1 Instrument,
) -> Pin<Box<dyn Future<Output = Result<Calendar, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn calendar<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument: &'life1 Instrument,
) -> Pin<Box<dyn Future<Output = Result<Calendar, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch the fundamentals calendar for the given instrument.
Source§impl CashflowProvider for MockConnector
impl CashflowProvider for MockConnector
Source§fn cashflow<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument: &'life1 Instrument,
_q: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<CashflowRow>, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn cashflow<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument: &'life1 Instrument,
_q: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<CashflowRow>, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch cashflow rows for the given instrument.
Source§impl Default for MockConnector
impl Default for MockConnector
Source§impl EarningsProvider for MockConnector
impl EarningsProvider for MockConnector
Source§impl EsgProvider for MockConnector
impl EsgProvider for MockConnector
Source§fn sustainability<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument: &'life1 Instrument,
) -> Pin<Box<dyn Future<Output = Result<EsgScores, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sustainability<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument: &'life1 Instrument,
) -> Pin<Box<dyn Future<Output = Result<EsgScores, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch ESG scores for the given instrument.
Source§impl HistoryProvider for MockConnector
impl HistoryProvider for MockConnector
Source§fn history<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument: &'life1 Instrument,
_req: HistoryRequest,
) -> Pin<Box<dyn Future<Output = Result<HistoryResponse, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn history<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument: &'life1 Instrument,
_req: HistoryRequest,
) -> Pin<Box<dyn Future<Output = Result<HistoryResponse, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch OHLCV history and actions for the given instrument and request.
Source§impl IncomeStatementProvider for MockConnector
impl IncomeStatementProvider for MockConnector
Source§fn income_statement<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument: &'life1 Instrument,
_q: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<IncomeStatementRow>, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn income_statement<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument: &'life1 Instrument,
_q: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<IncomeStatementRow>, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch income statement rows for the given instrument.
Source§impl NewsProvider for MockConnector
impl NewsProvider for MockConnector
Source§fn news<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument: &'life1 Instrument,
req: NewsRequest,
) -> Pin<Box<dyn Future<Output = Result<Vec<NewsArticle>, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn news<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument: &'life1 Instrument,
req: NewsRequest,
) -> Pin<Box<dyn Future<Output = Result<Vec<NewsArticle>, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch news articles for the given instrument.
Source§impl OptionChainProvider for MockConnector
impl OptionChainProvider for MockConnector
Source§fn option_chain<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument: &'life1 Instrument,
date: Option<i64>,
) -> Pin<Box<dyn Future<Output = Result<OptionChain, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn option_chain<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument: &'life1 Instrument,
date: Option<i64>,
) -> Pin<Box<dyn Future<Output = Result<OptionChain, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch an option chain for the given instrument and optional expiration date.
Source§impl OptionsExpirationsProvider for MockConnector
impl OptionsExpirationsProvider for MockConnector
Source§fn options_expirations<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument: &'life1 Instrument,
) -> Pin<Box<dyn Future<Output = Result<Vec<i64>, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn options_expirations<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument: &'life1 Instrument,
) -> Pin<Box<dyn Future<Output = Result<Vec<i64>, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch a list of option expiration timestamps for the given instrument.
Source§impl ProfileProvider for MockConnector
impl ProfileProvider for MockConnector
Source§impl QuoteProvider for MockConnector
impl QuoteProvider for MockConnector
Source§impl RecommendationsProvider for MockConnector
impl RecommendationsProvider for MockConnector
Source§fn recommendations<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument: &'life1 Instrument,
) -> Pin<Box<dyn Future<Output = Result<Vec<RecommendationRow>, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn recommendations<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument: &'life1 Instrument,
) -> Pin<Box<dyn Future<Output = Result<Vec<RecommendationRow>, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch recommendation rows for the given instrument.
Source§impl RecommendationsSummaryProvider for MockConnector
impl RecommendationsSummaryProvider for MockConnector
Source§fn recommendations_summary<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument: &'life1 Instrument,
) -> Pin<Box<dyn Future<Output = Result<RecommendationSummary, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn recommendations_summary<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument: &'life1 Instrument,
) -> Pin<Box<dyn Future<Output = Result<RecommendationSummary, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch a recommendations summary for the given instrument.
Source§impl SearchProvider for MockConnector
impl SearchProvider for MockConnector
Source§fn search<'life0, 'async_trait>(
&'life0 self,
req: SearchRequest,
) -> Pin<Box<dyn Future<Output = Result<SearchResponse, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn search<'life0, 'async_trait>(
&'life0 self,
req: SearchRequest,
) -> Pin<Box<dyn Future<Output = Result<SearchResponse, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Perform a symbol search according to the provided request.
Source§impl UpgradesDowngradesProvider for MockConnector
impl UpgradesDowngradesProvider for MockConnector
Source§fn upgrades_downgrades<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument: &'life1 Instrument,
) -> Pin<Box<dyn Future<Output = Result<Vec<UpgradeDowngradeRow>, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn upgrades_downgrades<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument: &'life1 Instrument,
) -> Pin<Box<dyn Future<Output = Result<Vec<UpgradeDowngradeRow>, BorsaError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch upgrade/downgrade rows for the given instrument.
Auto Trait Implementations§
impl Freeze for MockConnector
impl RefUnwindSafe for MockConnector
impl Send for MockConnector
impl Sync for MockConnector
impl Unpin for MockConnector
impl UnwindSafe for MockConnector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more