Trait DataActor

Source
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§

Source

fn on_save(&self) -> Result<HashMap<String, Vec<u8>>>

Actions to be performed when the actor state is saved.

Source

fn on_load(&mut self, state: HashMap<String, Vec<u8>>) -> Result<()>

Actions to be performed when the actor state is loaded.

Source

fn on_start(&mut self) -> Result<()>

Actions to be performed on start.

Source

fn on_stop(&mut self) -> Result<()>

Actions to be performed on stop.

Source

fn on_resume(&mut self) -> Result<()>

Actions to be performed on resume.

Source

fn on_reset(&mut self) -> Result<()>

Actions to be performed on reset.

Source

fn on_dispose(&mut self) -> Result<()>

Actions to be performed on dispose.

Source

fn on_degrade(&mut self) -> Result<()>

Actions to be performed on degrade.

Source

fn on_fault(&mut self) -> Result<()>

Actions to be performed on fault.

Source

fn on_data(&mut self, data: &dyn Any) -> Result<()>

Source

fn on_signal(&mut self, signal: &Signal) -> Result<()>

Actions to be performed when receiving a signal.

Source

fn on_instrument(&mut self, instrument: &InstrumentAny) -> Result<()>

Actions to be performed when receiving an instrument.

Source

fn on_book_deltas(&mut self, deltas: &OrderBookDeltas) -> Result<()>

Actions to be performed when receiving order book deltas.

Source

fn on_book(&mut self, order_book: &OrderBook) -> Result<()>

Actions to be performed when receiving an order book.

Source

fn on_quote(&mut self, quote: &QuoteTick) -> Result<()>

Actions to be performed when receiving a quote.

Source

fn on_trade(&mut self, tick: &TradeTick) -> Result<()>

Actions to be performed when receiving a trade.

Source

fn on_bar(&mut self, bar: &Bar) -> Result<()>

Actions to be performed when receiving a bar.

Source

fn on_mark_price(&mut self, mark_price: &MarkPriceUpdate) -> Result<()>

Actions to be performed when receiving a mark price update.

Source

fn on_index_price(&mut self, index_price: &IndexPriceUpdate) -> Result<()>

Actions to be performed when receiving an index price update.

Source

fn on_instrument_status(&mut self, data: &InstrumentStatus) -> Result<()>

Actions to be performed when receiving an instrument status update.

Source

fn on_instrument_close(&mut self, update: &InstrumentClose) -> Result<()>

Actions to be performed when receiving an instrument close update.

Source

fn on_historical_data(&mut self, data: &dyn Any) -> Result<()>

Actions to be performed when receiving historical data.

Source

fn on_time_event(&mut self, event: &TimeEvent) -> Result<()>

Actions to be performanced when receiving a time event.

Source

fn on_event(&mut self, event: &dyn Any) -> Result<()>

Actions to be performed when receiving an event.

Implementors§