pub trait DataActor: Actor {
Show 24 methods
// Provided methods
fn on_save(&self) -> Result<HashMap<String, Vec<u8>>> { ... }
fn on_load(&mut self, state: HashMap<String, Vec<u8>>) -> Result<()> { ... }
fn on_start(&mut self) -> Result<()> { ... }
fn on_stop(&mut self) -> Result<()> { ... }
fn on_resume(&mut self) -> Result<()> { ... }
fn on_reset(&mut self) -> Result<()> { ... }
fn on_dispose(&mut self) -> Result<()> { ... }
fn on_degrade(&mut self) -> Result<()> { ... }
fn on_fault(&mut self) -> Result<()> { ... }
fn on_data(&mut self, data: &dyn Any) -> Result<()> { ... }
fn on_signal(&mut self, signal: &Signal) -> Result<()> { ... }
fn on_instrument(&mut self, instrument: &InstrumentAny) -> Result<()> { ... }
fn on_book_deltas(&mut self, deltas: &OrderBookDeltas) -> Result<()> { ... }
fn on_book(&mut self, order_book: &OrderBook) -> Result<()> { ... }
fn on_quote(&mut self, quote: &QuoteTick) -> Result<()> { ... }
fn on_trade(&mut self, tick: &TradeTick) -> Result<()> { ... }
fn on_bar(&mut self, bar: &Bar) -> Result<()> { ... }
fn on_mark_price(&mut self, mark_price: &MarkPriceUpdate) -> Result<()> { ... }
fn on_index_price(&mut self, index_price: &IndexPriceUpdate) -> Result<()> { ... }
fn on_instrument_status(&mut self, data: &InstrumentStatus) -> Result<()> { ... }
fn on_instrument_close(&mut self, update: &InstrumentClose) -> Result<()> { ... }
fn on_historical_data(&mut self, data: &dyn Any) -> Result<()> { ... }
fn on_time_event(&mut self, event: &TimeEvent) -> Result<()> { ... }
fn on_event(&mut self, event: &dyn Any) -> Result<()> { ... }
}
Provided Methods§
Sourcefn on_save(&self) -> Result<HashMap<String, Vec<u8>>>
fn on_save(&self) -> Result<HashMap<String, Vec<u8>>>
Actions to be performed when the actor state is saved.
Sourcefn on_load(&mut self, state: HashMap<String, Vec<u8>>) -> Result<()>
fn on_load(&mut self, state: HashMap<String, Vec<u8>>) -> Result<()>
Actions to be performed when the actor state is loaded.
Sourcefn on_dispose(&mut self) -> Result<()>
fn on_dispose(&mut self) -> Result<()>
Actions to be performed on dispose.
Sourcefn on_degrade(&mut self) -> Result<()>
fn on_degrade(&mut self) -> Result<()>
Actions to be performed on degrade.
fn on_data(&mut self, data: &dyn Any) -> Result<()>
Sourcefn on_signal(&mut self, signal: &Signal) -> Result<()>
fn on_signal(&mut self, signal: &Signal) -> Result<()>
Actions to be performed when receiving a signal.
Sourcefn on_instrument(&mut self, instrument: &InstrumentAny) -> Result<()>
fn on_instrument(&mut self, instrument: &InstrumentAny) -> Result<()>
Actions to be performed when receiving an instrument.
Sourcefn on_book_deltas(&mut self, deltas: &OrderBookDeltas) -> Result<()>
fn on_book_deltas(&mut self, deltas: &OrderBookDeltas) -> Result<()>
Actions to be performed when receiving order book deltas.
Sourcefn on_book(&mut self, order_book: &OrderBook) -> Result<()>
fn on_book(&mut self, order_book: &OrderBook) -> Result<()>
Actions to be performed when receiving an order book.
Sourcefn on_quote(&mut self, quote: &QuoteTick) -> Result<()>
fn on_quote(&mut self, quote: &QuoteTick) -> Result<()>
Actions to be performed when receiving a quote.
Sourcefn on_trade(&mut self, tick: &TradeTick) -> Result<()>
fn on_trade(&mut self, tick: &TradeTick) -> Result<()>
Actions to be performed when receiving a trade.
Sourcefn on_mark_price(&mut self, mark_price: &MarkPriceUpdate) -> Result<()>
fn on_mark_price(&mut self, mark_price: &MarkPriceUpdate) -> Result<()>
Actions to be performed when receiving a mark price update.
Sourcefn on_index_price(&mut self, index_price: &IndexPriceUpdate) -> Result<()>
fn on_index_price(&mut self, index_price: &IndexPriceUpdate) -> Result<()>
Actions to be performed when receiving an index price update.
Sourcefn on_instrument_status(&mut self, data: &InstrumentStatus) -> Result<()>
fn on_instrument_status(&mut self, data: &InstrumentStatus) -> Result<()>
Actions to be performed when receiving an instrument status update.
Sourcefn on_instrument_close(&mut self, update: &InstrumentClose) -> Result<()>
fn on_instrument_close(&mut self, update: &InstrumentClose) -> Result<()>
Actions to be performed when receiving an instrument close update.
Sourcefn on_historical_data(&mut self, data: &dyn Any) -> Result<()>
fn on_historical_data(&mut self, data: &dyn Any) -> Result<()>
Actions to be performed when receiving historical data.
Sourcefn on_time_event(&mut self, event: &TimeEvent) -> Result<()>
fn on_time_event(&mut self, event: &TimeEvent) -> Result<()>
Actions to be performanced when receiving a time event.