Skip to main content

DataTester

Struct DataTester 

Source
pub struct DataTester { /* private fields */ }
Expand description

A data tester actor for live testing market data subscriptions.

Subscribes to configured data types for specified instruments and logs received data to demonstrate the data flow. Useful for testing adapters and validating data connectivity.

This actor provides equivalent functionality to the Python DataTester in the test kit.

Implementations§

Source§

impl DataTester

Source

pub fn new(config: DataTesterConfig) -> Self

Creates a new DataTester instance.

Trait Implementations§

Source§

impl DataActor for DataTester

Source§

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

Actions to be performed on start. Read more
Source§

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

Actions to be performed on stop. Read more
Source§

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

Actions to be performed when receiving a time event. Read more
Source§

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

Actions to be performed when receiving an instrument. Read more
Source§

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

Actions to be performed when receiving an order book. Read more
Source§

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

Actions to be performed when receiving order book deltas. Read more
Source§

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

Actions to be performed when receiving a quote. Read more
Source§

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

Actions to be performed when receiving a trade. Read more
Source§

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

Actions to be performed when receiving a bar. Read more
Source§

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

Actions to be performed when receiving a mark price update. Read more
Source§

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

Actions to be performed when receiving an index price update. Read more
Source§

fn on_funding_rate(&mut self, funding_rate: &FundingRateUpdate) -> Result<()>

Actions to be performed when receiving a funding rate update. Read more
Source§

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

Actions to be performed when receiving an instrument status update. Read more
Source§

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

Actions to be performed when receiving an instrument close update. Read more
Source§

fn on_option_greeks(&mut self, greeks: &OptionGreeks) -> Result<()>

Actions to be performed when receiving exchange-provided option greeks. Read more
Source§

fn on_historical_trades(&mut self, trades: &[TradeTick]) -> Result<()>

Actions to be performed when receiving historical trades. Read more
Source§

fn on_historical_quotes(&mut self, quotes: &[QuoteTick]) -> Result<()>

Actions to be performed when receiving historical quotes. Read more
Source§

fn on_historical_funding_rates( &mut self, funding_rates: &[FundingRateUpdate], ) -> Result<()>

Actions to be performed when receiving historical funding rates. Read more
Source§

fn on_historical_bars(&mut self, bars: &[Bar]) -> Result<()>

Actions to be performed when receiving historical bars. Read more
Source§

fn actor_id(&self) -> ActorId
where Self: DataActorNative,

Returns the actor ID.
Source§

fn trader_id(&self) -> Option<TraderId>
where Self: DataActorNative,

Returns the trader ID this actor is registered to.
Source§

fn is_registered(&self) -> bool
where Self: DataActorNative,

Returns whether the actor is registered with a trader.
Source§

fn config(&self) -> &DataActorConfig
where Self: DataActorNative,

Returns the actor configuration.
Source§

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

Actions to be performed when the actor state is saved. Read more
Source§

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

Actions to be performed when the actor state is loaded. Read more
Source§

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

Actions to be performed on resume. Read more
Source§

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

Actions to be performed on reset. Read more
Source§

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

Actions to be performed on dispose. Read more
Source§

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

Actions to be performed on degrade. Read more
Source§

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

Actions to be performed on fault. Read more
Source§

fn on_data(&mut self, data: &CustomData) -> Result<(), Error>

Actions to be performed when receiving custom data. Read more
Source§

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

Actions to be performed when receiving a signal. Read more
Source§

fn on_option_chain(&mut self, slice: &OptionChainSlice) -> Result<(), Error>

Actions to be performed when receiving an option chain slice snapshot. Read more
Source§

fn on_order_filled(&mut self, event: &OrderFilled) -> Result<(), Error>

Actions to be performed when receiving an order filled event. Read more
Source§

fn on_order_canceled(&mut self, event: &OrderCanceled) -> Result<(), Error>

Actions to be performed when receiving an order canceled event. Read more
Source§

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

Actions to be performed when receiving historical data. Read more
Source§

fn on_historical_book_deltas( &mut self, deltas: &[OrderBookDelta], ) -> Result<(), Error>

Actions to be performed when receiving historical book deltas. Read more
Source§

fn on_historical_book_depth( &mut self, depths: &[OrderBookDepth10], ) -> Result<(), Error>

Actions to be performed when receiving historical book depth. Read more
Source§

fn on_historical_mark_prices( &mut self, mark_prices: &[MarkPriceUpdate], ) -> Result<(), Error>

Actions to be performed when receiving historical mark prices. Read more
Source§

fn on_historical_index_prices( &mut self, index_prices: &[IndexPriceUpdate], ) -> Result<(), Error>

Actions to be performed when receiving historical index prices. Read more
Source§

fn clock(&self) -> ClockApi<'_>
where Self: DataActorNative,

Returns the user-facing clock API.
Source§

fn cache(&self) -> CacheApi<'_>
where Self: DataActorNative,

Returns the user-facing cache API.
Source§

fn shutdown_system(&self, reason: Option<String>)
where Self: DataActorNative,

Sends a shutdown command to the system with an optional reason. Read more
Source§

fn publish_data(&self, data_type: &DataType, data: &CustomData)
where Self: DataActorNative,

Publishes data on the message bus under the topic derived from data_type. Read more
Source§

fn publish_signal(&self, name: &str, value: String, ts_event: UnixNanos)
where Self: DataActorNative,

Publishes a Signal constructed from name and value. Read more
Source§

fn add_synthetic(&self, synthetic: SyntheticInstrument) -> Result<(), Error>
where Self: DataActorNative,

Adds the synthetic instrument to the cache. Read more
Source§

fn update_synthetic(&self, synthetic: SyntheticInstrument) -> Result<(), Error>
where Self: DataActorNative,

Updates the synthetic instrument in the cache, replacing the existing entry. Read more
Source§

fn handle_time_event(&mut self, event: &TimeEvent)

Handles a received time event.
Source§

fn handle_data(&mut self, data: &CustomData)

Handles a received custom data point.
Source§

fn handle_signal(&mut self, signal: &Signal)

Handles a received signal.
Source§

fn handle_instrument(&mut self, instrument: &InstrumentAny)

Handles a received instrument.
Source§

fn handle_book_deltas(&mut self, deltas: &OrderBookDeltas)

Handles received order book deltas.
Source§

fn handle_book(&mut self, book: &OrderBook)

Handles a received order book reference.
Source§

fn handle_quote(&mut self, quote: &QuoteTick)
where Self: DataActorNative,

Handles a received quote.
Source§

fn handle_trade(&mut self, trade: &TradeTick)
where Self: DataActorNative,

Handles a received trade.
Source§

fn handle_bar(&mut self, bar: &Bar)
where Self: DataActorNative,

Handles a receiving bar.
Source§

fn handle_mark_price(&mut self, mark_price: &MarkPriceUpdate)

Handles a received mark price update.
Source§

fn handle_index_price(&mut self, index_price: &IndexPriceUpdate)

Handles a received index price update.
Source§

fn handle_funding_rate(&mut self, funding_rate: &FundingRateUpdate)

Handles a received funding rate update.
Source§

fn handle_option_greeks(&mut self, greeks: &OptionGreeks)

Handles a received option greeks update.
Source§

fn handle_option_chain(&mut self, slice: &OptionChainSlice)

Handles a received option chain slice snapshot.
Source§

fn handle_instrument_status(&mut self, status: &InstrumentStatus)

Handles a received instrument status.
Source§

fn handle_instrument_close(&mut self, close: &InstrumentClose)

Handles a received instrument close.
Source§

fn handle_order_filled(&mut self, event: &OrderFilled)
where Self: DataActorNative,

Handles a received order filled event.
Source§

fn handle_order_canceled(&mut self, event: &OrderCanceled)
where Self: DataActorNative,

Handles a received order canceled event.
Source§

fn handle_historical_data(&mut self, data: &(dyn Any + 'static))

Handles received historical data.
Source§

fn handle_data_response(&mut self, resp: &CustomDataResponse)

Handles a data response.
Source§

fn handle_instrument_response(&mut self, resp: &InstrumentResponse)

Handles an instrument response.
Source§

fn handle_instruments_response(&mut self, resp: &InstrumentsResponse)

Handles an instruments response.
Source§

fn handle_book_response(&mut self, resp: &BookResponse)

Handles a book response.
Source§

fn handle_book_deltas_response(&mut self, resp: &BookDeltasResponse)

Handles a book deltas response.
Source§

fn handle_book_depth_response(&mut self, resp: &BookDepthResponse)

Handles a book depth response.
Source§

fn handle_quotes_response(&mut self, resp: &QuotesResponse)
where Self: DataActorNative,

Handles a quotes response.
Source§

fn handle_trades_response(&mut self, resp: &TradesResponse)
where Self: DataActorNative,

Handles a trades response.
Source§

fn handle_bars_response(&mut self, resp: &BarsResponse)
where Self: DataActorNative,

Handles a bars response.
Source§

fn handle_funding_rates_response(&mut self, resp: &FundingRatesResponse)

Handles a funding rates response.
Source§

fn subscribe_data( &mut self, data_type: DataType, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Subscribe to streaming data_type data.
Source§

fn subscribe_signal(&mut self, name: &str, priority: Option<u32>)
where Self: DataActorNative + Sized + 'static + Debug,

Subscribe to Signal data by name. Read more
Source§

fn subscribe_quotes( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Subscribe to streaming QuoteTick data for the instrument_id.
Source§

fn subscribe_instruments( &mut self, venue: Venue, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Subscribe to streaming InstrumentAny data for the venue.
Source§

fn subscribe_instrument( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Subscribe to streaming InstrumentAny data for the instrument_id.
Source§

fn subscribe_book_deltas( &mut self, instrument_id: InstrumentId, book_type: BookType, depth: Option<NonZero<usize>>, client_id: Option<ClientId>, managed: bool, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Subscribe to streaming OrderBookDeltas data for the instrument_id.
Source§

fn subscribe_book_at_interval( &mut self, instrument_id: InstrumentId, book_type: BookType, depth: Option<NonZero<usize>>, interval_ms: NonZero<usize>, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Subscribe to OrderBook snapshots at a specified interval for the instrument_id.
Source§

fn subscribe_trades( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Subscribe to streaming TradeTick data for the instrument_id.
Source§

fn subscribe_bars( &mut self, bar_type: BarType, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Subscribe to streaming Bar data for the bar_type.
Source§

fn subscribe_mark_prices( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Subscribe to streaming MarkPriceUpdate data for the instrument_id.
Source§

fn subscribe_index_prices( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Subscribe to streaming IndexPriceUpdate data for the instrument_id.
Source§

fn subscribe_funding_rates( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Subscribe to streaming FundingRateUpdate data for the instrument_id.
Source§

fn subscribe_option_greeks( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Subscribe to streaming OptionGreeks data for the instrument_id.
Source§

fn subscribe_instrument_status( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Subscribe to streaming InstrumentStatus data for the instrument_id.
Source§

fn subscribe_instrument_close( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Subscribe to streaming InstrumentClose data for the instrument_id.
Source§

fn subscribe_option_chain( &mut self, series_id: OptionSeriesId, strike_range: StrikeRange, snapshot_interval_ms: Option<u64>, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Subscribe to streaming OptionChainSlice snapshots for the option series_id. Read more
Source§

fn subscribe_order_fills(&mut self, instrument_id: InstrumentId)
where Self: DataActorNative + Sized + 'static + Debug,

Subscribe to OrderFilled events for the instrument_id.
Source§

fn subscribe_order_cancels(&mut self, instrument_id: InstrumentId)
where Self: DataActorNative + Sized + 'static + Debug,

Subscribe to OrderCanceled events for the instrument_id.
Source§

fn unsubscribe_data( &mut self, data_type: DataType, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Unsubscribe from streaming data_type data.
Source§

fn unsubscribe_signal(&mut self, name: &str)
where Self: DataActorNative + Sized + 'static + Debug,

Unsubscribe from Signal data by name.
Source§

fn unsubscribe_instruments( &mut self, venue: Venue, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Unsubscribe from streaming InstrumentAny data for the venue.
Source§

fn unsubscribe_instrument( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Unsubscribe from streaming InstrumentAny data for the instrument_id.
Source§

fn unsubscribe_book_deltas( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Unsubscribe from streaming OrderBookDeltas data for the instrument_id.
Source§

fn unsubscribe_book_at_interval( &mut self, instrument_id: InstrumentId, interval_ms: NonZero<usize>, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Unsubscribe from OrderBook snapshots at a specified interval for the instrument_id.
Source§

fn unsubscribe_quotes( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Unsubscribe from streaming QuoteTick data for the instrument_id.
Source§

fn unsubscribe_trades( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Unsubscribe from streaming TradeTick data for the instrument_id.
Source§

fn unsubscribe_bars( &mut self, bar_type: BarType, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Unsubscribe from streaming Bar data for the bar_type.
Source§

fn unsubscribe_mark_prices( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Unsubscribe from streaming MarkPriceUpdate data for the instrument_id.
Source§

fn unsubscribe_index_prices( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Unsubscribe from streaming IndexPriceUpdate data for the instrument_id.
Source§

fn unsubscribe_funding_rates( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Unsubscribe from streaming FundingRateUpdate data for the instrument_id.
Source§

fn unsubscribe_option_greeks( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Unsubscribe from streaming OptionGreeks data for the instrument_id.
Source§

fn unsubscribe_instrument_status( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Unsubscribe from streaming InstrumentStatus data for the instrument_id.
Source§

fn unsubscribe_instrument_close( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
where Self: DataActorNative + Sized + 'static + Debug,

Unsubscribe from streaming InstrumentClose data for the instrument_id.
Source§

fn unsubscribe_option_chain( &mut self, series_id: OptionSeriesId, client_id: Option<ClientId>, )
where Self: DataActorNative + Sized + 'static + Debug,

Unsubscribe from streaming OptionChainSlice snapshots for the option series_id.
Source§

fn unsubscribe_order_fills(&mut self, instrument_id: InstrumentId)
where Self: DataActorNative + Sized + 'static + Debug,

Unsubscribe from OrderFilled events for the instrument_id.
Source§

fn unsubscribe_order_cancels(&mut self, instrument_id: InstrumentId)
where Self: DataActorNative + Sized + 'static + Debug,

Unsubscribe from OrderCanceled events for the instrument_id.
Source§

fn request_data( &mut self, data_type: DataType, client_id: ClientId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZero<usize>>, params: Option<Params>, ) -> Result<UUID4, Error>
where Self: DataActorNative + Sized + 'static + Debug,

Request historical custom data of the given data_type. Read more
Source§

fn request_instrument( &mut self, instrument_id: InstrumentId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4, Error>
where Self: DataActorNative + Sized + 'static + Debug,

Request historical InstrumentResponse data for the given instrument_id. Read more
Source§

fn request_instruments( &mut self, venue: Option<Venue>, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4, Error>
where Self: DataActorNative + Sized + 'static + Debug,

Request historical InstrumentsResponse definitions for the optional venue. Read more
Source§

fn request_book_snapshot( &mut self, instrument_id: InstrumentId, depth: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4, Error>
where Self: DataActorNative + Sized + 'static + Debug,

Request an OrderBook snapshot for the given instrument_id. Read more
Source§

fn request_book_deltas( &mut self, instrument_id: InstrumentId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4, Error>
where Self: DataActorNative + Sized + 'static + Debug,

Request historical OrderBookDelta data for the given instrument_id. Read more
Source§

fn request_book_depth( &mut self, instrument_id: InstrumentId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZero<usize>>, depth: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4, Error>
where Self: DataActorNative + Sized + 'static + Debug,

Request historical OrderBookDepth10 data for the given instrument_id. Read more
Source§

fn request_quotes( &mut self, instrument_id: InstrumentId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4, Error>
where Self: DataActorNative + Sized + 'static + Debug,

Request historical QuoteTick data for the given instrument_id. Read more
Source§

fn request_trades( &mut self, instrument_id: InstrumentId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4, Error>
where Self: DataActorNative + Sized + 'static + Debug,

Request historical TradeTick data for the given instrument_id. Read more
Source§

fn request_bars( &mut self, bar_type: BarType, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4, Error>
where Self: DataActorNative + Sized + 'static + Debug,

Request historical Bar data for the given bar_type. Read more
Source§

fn request_funding_rates( &mut self, instrument_id: InstrumentId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4, Error>
where Self: DataActorNative + Sized + 'static + Debug,

Request historical FundingRateUpdate data for the given instrument_id. Read more
Source§

impl DataActorNative for DataTester

Source§

fn core(&self) -> &DataActorCore

Returns the actor core.
Source§

fn core_mut(&mut self) -> &mut DataActorCore

Returns the mutable actor core.
Source§

fn clock_mut(&mut self) -> RefMut<'_, dyn Clock + 'static>

Returns the mutable clock borrow for the actor. Read more
Source§

fn clock_rc(&self) -> Rc<RefCell<dyn Clock>>

Returns a clone of the reference-counted clock. Read more
Source§

fn cache_ref(&self) -> Ref<'_, Cache>

Returns a read-only cache borrow. Read more
Source§

fn cache_rc(&self) -> Rc<RefCell<Cache>>

Returns a clone of the reference-counted cache. Read more
Source§

impl Debug for DataTester

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Actor for T
where T: DataActor + DataActorNative + Debug + 'static,

Source§

fn id(&self) -> Ustr

The unique identifier for the actor.
Source§

fn handle(&mut self, msg: &(dyn Any + 'static))

Handles the msg.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Returns a reference to self as Any, for downcasting support.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
where Self: Sized,

Returns a mutable reference to self as Any, for downcasting support. Read more
Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Component for T
where T: DataActor + DataActorNative + Debug + 'static,

Source§

fn component_id(&self) -> ComponentId

Returns the unique identifier for this component.
Source§

fn state(&self) -> ComponentState

Returns the current state of the component.
Source§

fn transition_state(&mut self, trigger: ComponentTrigger) -> Result<(), Error>

Transition the component with the state trigger. Read more
Source§

fn register( &mut self, trader_id: TraderId, clock: Rc<RefCell<dyn Clock>>, cache: Rc<RefCell<Cache>>, ) -> Result<(), Error>

Registers the component with a system. Read more
Source§

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

Actions to be performed on start. Read more
Source§

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

Actions to be performed on stop. Read more
Source§

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

Actions to be performed on resume. Read more
Source§

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

Actions to be performed on degrade. Read more
Source§

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

Actions to be performed on fault. Read more
Source§

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

Actions to be performed on reset. Read more
Source§

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

Actions to be performed on dispose. Read more
Source§

fn is_ready(&self) -> bool

Returns whether the component is ready.
Source§

fn not_running(&self) -> bool

Returns whether the component is not running.
Source§

fn is_running(&self) -> bool

Returns whether the component is running.
Source§

fn is_stopped(&self) -> bool

Returns whether the component is stopped.
Source§

fn is_degraded(&self) -> bool

Returns whether the component has been degraded.
Source§

fn is_faulted(&self) -> bool

Returns whether the component has been faulted.
Source§

fn is_disposed(&self) -> bool

Returns whether the component has been disposed.
Source§

fn initialize(&mut self) -> Result<(), Error>

Initializes the component. Read more
Source§

fn start(&mut self) -> Result<(), Error>

Starts the component. Read more
Source§

fn stop(&mut self) -> Result<(), Error>

Stops the component. Read more
Source§

fn resume(&mut self) -> Result<(), Error>

Resumes the component. Read more
Source§

fn degrade(&mut self) -> Result<(), Error>

Degrades the component. Read more
Source§

fn fault(&mut self) -> Result<(), Error>

Faults the component. Read more
Source§

fn reset(&mut self) -> Result<(), Error>

Resets the component to its initial state. Read more
Source§

fn dispose(&mut self) -> Result<(), Error>

Disposes of the component, releasing any resources. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more