pub struct Capability(/* private fields */);Expand description
Capability bits that a provider can declare.
Route a capability to specific providers using .route(Capability::QUOTE, [Provider::Fmp]).
If no route is configured for a capability, only Yahoo is used, or EDGAR
then Yahoo for Capability::FILINGS.
Implementations§
Source§impl Capability
impl Capability
Sourcepub const FUNDAMENTALS: Self
pub const FUNDAMENTALS: Self
Financial statements — income, balance sheet, cash flow.
Sourcepub const DISCOVERY: Self
pub const DISCOVERY: Self
Symbol discovery — search, screeners, exchange and ticker reference data.
Sourcepub const CALENDAR: Self
pub const CALENDAR: Self
Market-wide calendars — earnings, IPOs, dividends, splits, economic events.
Sourcepub const COMMODITIES: Self
pub const COMMODITIES: Self
Commodity price quotes (gold, oil, etc.).
Sourcepub const fn union(self, other: Self) -> Self
pub const fn union(self, other: Self) -> Self
Const-context union, for capability-set consts (std::ops::BitOr
isn’t const-callable).
Sourcepub fn all() -> impl Iterator<Item = Self>
pub fn all() -> impl Iterator<Item = Self>
Every single-bit capability, in declaration order.
Combined sets are not included: this yields exactly the constants above.
Source§impl Capability
impl Capability
Sourcepub fn candidate_providers(self) -> Vec<Provider>
pub fn candidate_providers(self) -> Vec<Provider>
Providers whose capabilities() declare this capability, regardless of
which providers are actually configured/feature-enabled in this build.
Purely informational — used to make crate::FinanceError::NotSupported/
crate::FinanceError::NoProviderAvailable point at what would need to
be enabled (feature flag) and/or routed (Providers::builder().route(...)).
Built-ins only. A registered custom provider never appears here, since
Provider::capabilities cannot see an adapter’s accessors.
Trait Implementations§
Source§impl BitOr for Capability
impl BitOr for Capability
Source§impl Clone for Capability
impl Clone for Capability
Source§fn clone(&self) -> Capability
fn clone(&self) -> Capability
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for Capability
Source§impl Debug for Capability
impl Debug for Capability
Source§impl Display for Capability
impl Display for Capability
impl Eq for Capability
Source§impl Hash for Capability
impl Hash for Capability
Source§impl PartialEq for Capability
impl PartialEq for Capability
impl StructuralPartialEq for Capability
Auto Trait Implementations§
impl Freeze for Capability
impl RefUnwindSafe for Capability
impl Send for Capability
impl Sync for Capability
impl Unpin for Capability
impl UnsafeUnpin for Capability
impl UnwindSafe for Capability
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Key for Twhere
T: Clone,
impl<T> Key for Twhere
T: Clone,
impl<T> PlanCallbackArgs for T
impl<T> PlanCallbackOut for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more