pub trait InstrumentWriter: InstrumentReader {
// Required methods
fn save_market_and_instrument_sync(
&self,
underlying: &str,
expiry: i64,
instrument: &InstrumentRecord,
) -> Result<()>;
fn delete_market_and_instrument_sync(&self, symbol: &str) -> Result<()>;
fn update_instrument_status_sync(
&self,
symbols: &[String],
status: &str,
) -> Result<usize>;
fn transition_active_instruments_to_expired_pending_sync(
&self,
symbols: &[String],
) -> Result<usize>;
}Expand description
Instrument mutations.
Required Methods§
Sourcefn save_market_and_instrument_sync(
&self,
underlying: &str,
expiry: i64,
instrument: &InstrumentRecord,
) -> Result<()>
fn save_market_and_instrument_sync( &self, underlying: &str, expiry: i64, instrument: &InstrumentRecord, ) -> Result<()>
Persist a new instrument and its parent market. Only used for new
ACTIVE instruments – status transitions on existing instruments go
through update_instrument_status_sync.
Sourcefn delete_market_and_instrument_sync(&self, symbol: &str) -> Result<()>
fn delete_market_and_instrument_sync(&self, symbol: &str) -> Result<()>
Delete an instrument and its parent market row.
Sourcefn update_instrument_status_sync(
&self,
symbols: &[String],
status: &str,
) -> Result<usize>
fn update_instrument_status_sync( &self, symbols: &[String], status: &str, ) -> Result<usize>
Batch-update instrument status. Returns number of rows updated.
Sourcefn transition_active_instruments_to_expired_pending_sync(
&self,
symbols: &[String],
) -> Result<usize>
fn transition_active_instruments_to_expired_pending_sync( &self, symbols: &[String], ) -> Result<usize>
Transition only instruments that are still ACTIVE to EXPIRED_PENDING_PRICE. Returns number of rows updated.