Expand description
Module runner and invocation context.
Provides InvocationContext for CLI/RPC handlers, run_async for sync-over-async CLI,
and run_module for the unified connect/dispatch/loop lifecycle.
Structs§
- Invocation
Context - Context passed to CLI handlers for database and config access.
Functions§
- run_
async - Run an async future from a sync context (e.g. CLI handler).
Blocks the current thread and executes the future on the current runtime.
Use when
#[command]methods need to call async APIs. - run_
module - Run a module with automatic connect, registration, event subscription, and dispatch.
- run_
module_ with_ setup - Run a module where (module, cli) are created after connect.
- run_
module_ with_ tick - Run a module with optional on_connect (setup) and on_tick (periodic) callbacks.