pub struct AsyncRunner { /* private fields */ }Implementations§
Source§impl AsyncRunner
impl AsyncRunner
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new AsyncRunner instance.
Sourcepub fn handle(&self) -> AsyncRunnerHandle
pub fn handle(&self) -> AsyncRunnerHandle
Returns a handle that can be used to stop the runner from another context.
Sourcepub fn take_channels(self) -> AsyncRunnerChannels
pub fn take_channels(self) -> AsyncRunnerChannels
Consumes the runner and returns the channel receivers for direct event loop driving.
This is used when the event loop needs to run on the same thread as the msgbus endpoints (which use thread-local storage).
Source§impl AsyncRunner
impl AsyncRunner
Sourcepub async fn run(&mut self)
pub async fn run(&mut self)
Runs the async runner event loop.
This method processes data events, time events, execution events, and signal events in an async loop. It will run until a signal is received or the event streams are closed.
Sourcepub fn handle_time_event(handler: TimeEventHandlerV2)
pub fn handle_time_event(handler: TimeEventHandlerV2)
Handles a time event by running its callback.
Sourcepub fn handle_data_command(cmd: DataCommand)
pub fn handle_data_command(cmd: DataCommand)
Handles a data command by sending to the DataEngine.
Sourcepub fn handle_data_event(event: DataEvent)
pub fn handle_data_event(event: DataEvent)
Handles a data event by sending to the appropriate DataEngine endpoint.
Sourcepub fn handle_exec_command(cmd: TradingCommand)
pub fn handle_exec_command(cmd: TradingCommand)
Handles an execution command by sending to the ExecEngine.
Sourcepub fn handle_exec_event(event: ExecutionEvent)
pub fn handle_exec_event(event: ExecutionEvent)
Handles an execution event by sending to the appropriate engine endpoint.
pub fn handle_exec_report(report: ExecutionReport)
Trait Implementations§
Source§impl Debug for AsyncRunner
impl Debug for AsyncRunner
Auto Trait Implementations§
impl Freeze for AsyncRunner
impl RefUnwindSafe for AsyncRunner
impl Send for AsyncRunner
impl Sync for AsyncRunner
impl Unpin for AsyncRunner
impl UnwindSafe for AsyncRunner
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more