pub struct OptionChain(/* private fields */);Expand description
The latest option chain for one query, independent of egui. Clones share the subscription; dropping the last handle makes its sink inactive.
Implementations§
Source§impl OptionChain
impl OptionChain
Sourcepub fn new(
feed: &dyn Datafeed,
query: OptionChainQuery,
wake: impl Fn() + Send + Sync + 'static,
) -> Option<Self>
pub fn new( feed: &dyn Datafeed, query: OptionChainQuery, wake: impl Fn() + Send + Sync + 'static, ) -> Option<Self>
Subscribe through feed, outside egui closures, and wake the host on each snapshot or
error. Returns None for an empty underlying symbol or reversed expiry range.
Unsupported feeds immediately report FeedError::NotSupported through Self::error.
Sourcepub fn rows(&self) -> Arc<[OptionQuote]> ⓘ
pub fn rows(&self) -> Arc<[OptionQuote]> ⓘ
Latest complete accepted snapshot, in the feed’s order. Empty until one arrives.
Missing figures remain None; no calculation or aggregation is applied.
Trait Implementations§
Source§impl Clone for OptionChain
impl Clone for OptionChain
Source§fn clone(&self) -> OptionChain
fn clone(&self) -> OptionChain
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for OptionChain
impl !UnwindSafe for OptionChain
impl Freeze for OptionChain
impl Send for OptionChain
impl Sync for OptionChain
impl Unpin for OptionChain
impl UnsafeUnpin for OptionChain
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
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<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> ⓘ
Converts
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> ⓘ
Converts
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 more