pub trait DataActor: Actor {
Show 57 methods
// Required method
fn state(&self) -> ComponentState;
// Provided methods
fn is_ready(&self) -> bool { ... }
fn is_running(&self) -> bool { ... }
fn is_stopped(&self) -> bool { ... }
fn is_disposed(&self) -> bool { ... }
fn is_degraded(&self) -> bool { ... }
fn is_faulting(&self) -> bool { ... }
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_event(&mut self, event: &dyn Any) -> Result<()> { ... }
fn on_time_event(&mut self, event: &TimeEvent) -> 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_historical_quotes(&mut self, quotes: &[QuoteTick]) -> Result<()> { ... }
fn on_historical_trades(&mut self, trades: &[TradeTick]) -> Result<()> { ... }
fn on_historical_bars(&mut self, bars: &[Bar]) -> Result<()> { ... }
fn on_historical_mark_prices(
&mut self,
mark_prices: &[MarkPriceUpdate],
) -> Result<()> { ... }
fn on_historical_index_prices(
&mut self,
index_prices: &[IndexPriceUpdate],
) -> Result<()> { ... }
fn handle_data(&mut self, data: &dyn Any) { ... }
fn handle_signal(&mut self, signal: &Signal) { ... }
fn handle_instrument(&mut self, instrument: &InstrumentAny) { ... }
fn handle_book_deltas(&mut self, deltas: &OrderBookDeltas) { ... }
fn handle_book(&mut self, book: &OrderBook) { ... }
fn handle_quote(&mut self, quote: &QuoteTick) { ... }
fn handle_trade(&mut self, trade: &TradeTick) { ... }
fn handle_bar(&mut self, bar: &Bar) { ... }
fn handle_mark_price(&mut self, mark_price: &MarkPriceUpdate) { ... }
fn handle_index_price(&mut self, index_price: &IndexPriceUpdate) { ... }
fn handle_instrument_status(&mut self, status: &InstrumentStatus) { ... }
fn handle_instrument_close(&mut self, close: &InstrumentClose) { ... }
fn handle_historical_data(&mut self, data: &dyn Any) { ... }
fn handle_time_event(&mut self, event: &TimeEvent) { ... }
fn handle_event(&mut self, event: &dyn Any) { ... }
fn handle_data_response(&mut self, response: &CustomDataResponse) { ... }
fn handle_instruments_response(&mut self, response: &InstrumentsResponse) { ... }
fn handle_book_response(&mut self, response: &BookResponse) { ... }
fn handle_quotes_response(&mut self, response: &QuotesResponse) { ... }
fn handle_trades_response(&mut self, response: &TradesResponse) { ... }
fn handle_bars_response(&mut self, response: &BarsResponse) { ... }
}
Required Methods§
Sourcefn state(&self) -> ComponentState
fn state(&self) -> ComponentState
Returns the ComponentState
of the actor.
Provided Methods§
Sourcefn is_running(&self) -> bool
fn is_running(&self) -> bool
Returns true
if the actor is in a Running
state.
Sourcefn is_stopped(&self) -> bool
fn is_stopped(&self) -> bool
Returns true
if the actor is in a Stopped
state.
Sourcefn is_disposed(&self) -> bool
fn is_disposed(&self) -> bool
Returns true
if the actor is in a Disposed
state.
Sourcefn is_degraded(&self) -> bool
fn is_degraded(&self) -> bool
Returns true
if the actor is in a Degraded
state.
Sourcefn is_faulting(&self) -> bool
fn is_faulting(&self) -> bool
Returns true
if the actor is in a Faulted
state.
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.
Sourcefn on_event(&mut self, event: &dyn Any) -> Result<()>
fn on_event(&mut self, event: &dyn Any) -> Result<()>
Actions to be performed when receiving an event.
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.
Sourcefn on_data(&mut self, data: &dyn Any) -> Result<()>
fn on_data(&mut self, data: &dyn Any) -> Result<()>
Actions to be performed when receiving custom data.
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_historical_quotes(&mut self, quotes: &[QuoteTick]) -> Result<()>
fn on_historical_quotes(&mut self, quotes: &[QuoteTick]) -> Result<()>
Actions to be performed when receiving historical quotes.
Sourcefn on_historical_trades(&mut self, trades: &[TradeTick]) -> Result<()>
fn on_historical_trades(&mut self, trades: &[TradeTick]) -> Result<()>
Actions to be performed when receiving historical trades.
Sourcefn on_historical_bars(&mut self, bars: &[Bar]) -> Result<()>
fn on_historical_bars(&mut self, bars: &[Bar]) -> Result<()>
Actions to be performed when receiving historical bars.
Sourcefn on_historical_mark_prices(
&mut self,
mark_prices: &[MarkPriceUpdate],
) -> Result<()>
fn on_historical_mark_prices( &mut self, mark_prices: &[MarkPriceUpdate], ) -> Result<()>
Actions to be performed when receiving historical mark prices.
Sourcefn on_historical_index_prices(
&mut self,
index_prices: &[IndexPriceUpdate],
) -> Result<()>
fn on_historical_index_prices( &mut self, index_prices: &[IndexPriceUpdate], ) -> Result<()>
Actions to be performed when receiving historical index prices.
Sourcefn handle_data(&mut self, data: &dyn Any)
fn handle_data(&mut self, data: &dyn Any)
Handles a received custom/generic data point.
Sourcefn handle_signal(&mut self, signal: &Signal)
fn handle_signal(&mut self, signal: &Signal)
Handles a received signal.
Sourcefn handle_instrument(&mut self, instrument: &InstrumentAny)
fn handle_instrument(&mut self, instrument: &InstrumentAny)
Handles a received instrument.
Sourcefn handle_book_deltas(&mut self, deltas: &OrderBookDeltas)
fn handle_book_deltas(&mut self, deltas: &OrderBookDeltas)
Handles received order book deltas.
Sourcefn handle_book(&mut self, book: &OrderBook)
fn handle_book(&mut self, book: &OrderBook)
Handles a received order book reference.
Sourcefn handle_quote(&mut self, quote: &QuoteTick)
fn handle_quote(&mut self, quote: &QuoteTick)
Handles a received quote.
Sourcefn handle_trade(&mut self, trade: &TradeTick)
fn handle_trade(&mut self, trade: &TradeTick)
Handles a received trade.
Sourcefn handle_bar(&mut self, bar: &Bar)
fn handle_bar(&mut self, bar: &Bar)
Handles a receiving bar.
Sourcefn handle_mark_price(&mut self, mark_price: &MarkPriceUpdate)
fn handle_mark_price(&mut self, mark_price: &MarkPriceUpdate)
Handles a received mark price update.
Sourcefn handle_index_price(&mut self, index_price: &IndexPriceUpdate)
fn handle_index_price(&mut self, index_price: &IndexPriceUpdate)
Handles a received index price update.
Sourcefn handle_instrument_status(&mut self, status: &InstrumentStatus)
fn handle_instrument_status(&mut self, status: &InstrumentStatus)
Handles a received instrument status.
Sourcefn handle_instrument_close(&mut self, close: &InstrumentClose)
fn handle_instrument_close(&mut self, close: &InstrumentClose)
Handles a received instrument close.
Sourcefn handle_historical_data(&mut self, data: &dyn Any)
fn handle_historical_data(&mut self, data: &dyn Any)
Handles received historical data.
Sourcefn handle_time_event(&mut self, event: &TimeEvent)
fn handle_time_event(&mut self, event: &TimeEvent)
Handles a received time event.
Sourcefn handle_event(&mut self, event: &dyn Any)
fn handle_event(&mut self, event: &dyn Any)
Handles a received event.
Sourcefn handle_data_response(&mut self, response: &CustomDataResponse)
fn handle_data_response(&mut self, response: &CustomDataResponse)
Handles a data response.
Sourcefn handle_instruments_response(&mut self, response: &InstrumentsResponse)
fn handle_instruments_response(&mut self, response: &InstrumentsResponse)
Handles an instruments response.
Sourcefn handle_book_response(&mut self, response: &BookResponse)
fn handle_book_response(&mut self, response: &BookResponse)
Handles a book response.
Sourcefn handle_quotes_response(&mut self, response: &QuotesResponse)
fn handle_quotes_response(&mut self, response: &QuotesResponse)
Handles a quotes response.
Sourcefn handle_trades_response(&mut self, response: &TradesResponse)
fn handle_trades_response(&mut self, response: &TradesResponse)
Handles a trades response.
Sourcefn handle_bars_response(&mut self, response: &BarsResponse)
fn handle_bars_response(&mut self, response: &BarsResponse)
Handles a bars response.