#[non_exhaustive]pub struct ProviderCapabilities {
pub chain: ChainCapability,
pub depth: bool,
pub greeks: GreeksCapability,
pub option_stream: OptionStreamCapability,
pub underlying_stream: bool,
pub chain_poll: ChainPollCapability,
pub trades_tape: bool,
pub auth: AuthKind,
}Expand description
The honest, static capability self-declaration a Provider returns
(docs/03-data-providers.md §2). Streaming is three independent
dimensions — option_stream,
underlying_stream, and
chain_poll — so a real-time underlying is never mistaken
for a real-time option chain.
#[non_exhaustive]: an external adapter never uses a struct literal to build
this — it constructs through ProviderCapabilities::builder, so ChainView
can add a new optional dimension (a field with a safe default) as a minor
bump without breaking a downstream adapter’s construction (SEMVER.md).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.chain: ChainCapabilityHow (or whether) the provider produces a chain.
depth: boolWhether the provider delivers order-book depth for the selected instrument class (option chains in v1).
greeks: GreeksCapabilityWhether Greeks/IV are venue-provided, computed locally, or unavailable.
option_stream: OptionStreamCapabilityThe contract-level quote/Greek stream that overlays onto a chain.
underlying_stream: boolWhether the provider streams the underlying/index price.
chain_poll: ChainPollCapabilityHow the chain structure is kept current (REST polling cadence).
trades_tape: boolWhether the provider exposes a normalized public trades tape.
auth: AuthKindThe authentication the provider requires.
Implementations§
Source§impl ProviderCapabilities
impl ProviderCapabilities
Sourcepub fn builder() -> ProviderCapabilitiesBuilder
pub fn builder() -> ProviderCapabilitiesBuilder
The only cross-crate construction path (docs/03-data-providers.md
§2). Every dimension starts at its safe, least-capable default, so a
future new field lands with a default that keeps existing external
adapters compiling and honest.
§Examples
use chainview::{ChainCapability, ChainPollCapability, ProviderCapabilities};
let caps = ProviderCapabilities::builder()
.chain(ChainCapability::Assemble)
.depth(true)
.chain_poll(ChainPollCapability::Poll { interval_hint_secs: 2 })
.build();
assert!(caps.depth);
assert_eq!(caps.chain, ChainCapability::Assemble);Trait Implementations§
Source§impl Clone for ProviderCapabilities
impl Clone for ProviderCapabilities
Source§fn clone(&self) -> ProviderCapabilities
fn clone(&self) -> ProviderCapabilities
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 ProviderCapabilities
Source§impl Debug for ProviderCapabilities
impl Debug for ProviderCapabilities
impl Eq for ProviderCapabilities
Source§impl PartialEq for ProviderCapabilities
impl PartialEq for ProviderCapabilities
impl StructuralPartialEq for ProviderCapabilities
Auto Trait Implementations§
impl Freeze for ProviderCapabilities
impl RefUnwindSafe for ProviderCapabilities
impl Send for ProviderCapabilities
impl Sync for ProviderCapabilities
impl Unpin for ProviderCapabilities
impl UnsafeUnpin for ProviderCapabilities
impl UnwindSafe for ProviderCapabilities
Blanket Implementations§
impl<T> Allocation for T
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§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> 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,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.