pub trait TurnHooksAsync: Send + Sync {
// Provided methods
fn on_turn_start<'life0, 'life1, 'async_trait>(
&'life0 self,
_input: &'life1 TurnInput,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn on_patch_dispatched<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 PatchDispatchContext<'life2>,
) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn on_turn_complete<'life0, 'life1, 'async_trait>(
&'life0 self,
_outcome: &'life1 TurnOutcome,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
Async observability hooks for crate::AinlRuntime::run_turn_async (Tokio-friendly).
Graph SQLite I/O for that path runs on tokio::task::spawn_blocking; the graph itself stays
under Arc<std::sync::Mutex<_>> (not tokio::sync::Mutex) so the runtime can be constructed and
queried from any thread. See the crate root docs and README.md.