pub enum CallbackMode {
Blocking,
Concurrent,
}Expand description
Controls how a control-lane callback is executed relative to the event loop.
Each control-lane callback in EventCallbacks has a companion _mode field
(e.g., on_turn_complete_mode) that determines execution semantics.
At the L2 fluent API level, use _concurrent suffixed methods (e.g.,
on_turn_complete_concurrent()) to set both the callback and its mode
in a single call.
Variants§
Blocking
Callback is awaited inline — the event loop waits for completion.
Use when subsequent events depend on the callback’s side effects, or when ordering guarantees are required.
Concurrent
Callback is spawned as a concurrent task — the event loop continues immediately.
Use for fire-and-forget work: logging, analytics, webhook dispatch, background agent triggering. The callback runs in a detached tokio task.
Trait Implementations§
Source§impl Clone for CallbackMode
impl Clone for CallbackMode
Source§fn clone(&self) -> CallbackMode
fn clone(&self) -> CallbackMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more