pub struct OptionChainManager { /* private fields */ }Expand description
Per-series option chain manager.
Each instance manages a single option series: its aggregator,
handlers, timer, and lifecycle. The DataEngine holds one
manager per active series.
Implementations§
Source§impl OptionChainManager
impl OptionChainManager
Sourcepub fn all_instrument_ids(&self) -> Vec<InstrumentId>
pub fn all_instrument_ids(&self) -> Vec<InstrumentId>
Returns all instrument IDs in the full catalog (not just the active set).
Sourcepub fn teardown(&mut self, clock: &Rc<RefCell<dyn Clock>>)
pub fn teardown(&mut self, clock: &Rc<RefCell<dyn Clock>>)
Tears down this manager: unregisters all msgbus handlers and cancels the timer.
Sourcepub fn handle_greeks(&mut self, greeks: &OptionGreeks)
pub fn handle_greeks(&mut self, greeks: &OptionGreeks)
Routes incoming greeks to the aggregator.
Also updates the ATM tracker from the forward price if ForwardPrice source is active,
and triggers deferred bootstrap on the first arrival.
Sourcepub fn handle_instrument_expired(
&mut self,
instrument_id: &InstrumentId,
) -> bool
pub fn handle_instrument_expired( &mut self, instrument_id: &InstrumentId, ) -> bool
Handles an expired/settled instrument by removing it from the aggregator, unregistering msgbus handlers, and pushing deferred wire unsubscribes.
Returns true if the aggregator catalog is now empty (all instruments expired),
signaling the engine to tear down this entire manager.
Sourcepub fn handle_quote(&mut self, quote: &QuoteTick)
pub fn handle_quote(&mut self, quote: &QuoteTick)
Routes an incoming quote tick to the aggregator, then bootstraps if ready.
This handles both option instrument quotes (aggregator) and ATM source quotes (the aggregator’s ATM tracker handles filtering internally).
Sourcepub fn add_instrument(
&mut self,
instrument_id: InstrumentId,
strike: Price,
kind: OptionKind,
client: Option<&mut DataClientAdapter>,
clock: &Rc<RefCell<dyn Clock>>,
) -> bool
pub fn add_instrument( &mut self, instrument_id: InstrumentId, strike: Price, kind: OptionKind, client: Option<&mut DataClientAdapter>, clock: &Rc<RefCell<dyn Clock>>, ) -> bool
Adds a dynamically discovered instrument to this option chain.
Registers msgbus handlers when the instrument falls in the active
range and forwards wire-level subscriptions via client.
Returns true if the instrument was newly inserted.
Sourcepub fn publish_slice(&mut self, ts: UnixNanos)
pub fn publish_slice(&mut self, ts: UnixNanos)
Takes the accumulated snapshot and publishes it to the msgbus.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OptionChainManager
impl !RefUnwindSafe for OptionChainManager
impl !Send for OptionChainManager
impl !Sync for OptionChainManager
impl Unpin for OptionChainManager
impl UnsafeUnpin for OptionChainManager
impl !UnwindSafe for OptionChainManager
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
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 more