Skip to main content

async_run

Function async_run 

Source
pub async fn async_run<Events, Engine>(
    feed: &mut Events,
    engine: &mut Engine,
) -> Engine::Audit
where Events: Stream + Unpin, Events::Item: Debug + Clone, Engine: Processor<Events::Item> + Auditor<Engine::Audit, Context = EngineContext> + SyncShutdown, Engine::Audit: From<FeedEnded> + Terminal + Debug,
Expand description

Asynchronous Engine runner that processes input Events.

Runs until shutdown, returning an audit detailing the reason for the shutdown (eg/ Events FeedEnded, Command::Shutdown, etc.).

ยงArguments

  • Events - Stream of events for the Engine to process.
  • Engine - Event processor that produces audit events as output.
  • AuditTx - Channel for sending produced audit events.