Expand description
Global runtime machinery and thread-local storage.
This module provides global access to shared runtime resources including clocks, message queues, and time event channels. It manages thread-local storage for system-wide components that need to be accessible across threads.
Structs§
- Sync
Data Command Sender - Synchronous
DataCommandSenderfor backtest environments. - Sync
Trading Command Sender - Synchronous
TradingCommandSenderfor backtest environments. - Time
Event Message - A send-safe live time event channel payload.
- Trading
Command Message - A deferred trading command and its direct endpoint.
Enums§
- System
Channel - A monitored message channel feeding the runner event loop.
Traits§
- Data
Command Sender - Trait for data command sending that can be implemented for both sync and async runners.
- Time
Event Sender - Trait for time event sending that can be implemented for both sync and async runners.
- Trading
Command Sender - Trait for trading command sending that can be implemented for both sync and async runners.
Functions§
- capture_
trading_ cmd - Captures a trading command for dispatch after the current endpoint handler returns.
- data_
cmd_ queue_ is_ empty - Returns
trueif the data command queue is empty. - drain_
data_ cmd_ queue - Drain all buffered data commands, dispatching each to the data engine.
- drain_
trading_ cmd_ queue - Drains all buffered trading commands to their direct endpoints.
- get_
data_ cmd_ sender - Gets the global data command sender.
- get_
time_ event_ sender - Gets the global time event sender.
- get_
trading_ cmd_ sender - Gets the global trading command sender.
- replace_
data_ cmd_ sender - Replaces the global data command sender for the current thread.
- replace_
exec_ cmd_ sender - Replaces the global trading command sender for the current thread.
- replace_
time_ event_ sender - Replaces the global time event sender for the current thread.
- set_
data_ cmd_ sender - Sets the global data command sender.
- set_
exec_ cmd_ sender - Sets the global trading command sender.
- set_
time_ event_ sender - Sets the global time event sender.
- trading_
cmd_ is_ dispatching - Returns
truewhile a deferred trading command is being dispatched. - trading_
cmd_ queue_ is_ empty - Returns
trueif the trading command queue is empty. - try_
get_ time_ event_ sender - Attempts to get the global time event sender without panicking.
- try_
get_ trading_ cmd_ sender - Attempts to get the global trading command sender without panicking.