Skip to main content

with_operation_events

Function with_operation_events 

Source
pub fn with_operation_events<R>(
    hook: Option<impl Fn(&OperationEvent) + Send + Sync + 'static>,
    f: impl FnOnce() -> R,
) -> R
Expand description

Runs a closure with a temporary operation-level hook.

The hook receives lifecycle events for install, uninstall, detect and migration operations. Events include Started, Succeeded, and Failed phases with trace_id, error_code, and retryable metadata when available.