Skip to main content

PhaseEndTrigger

Trait PhaseEndTrigger 

Source
pub trait PhaseEndTrigger:
    Send
    + Sync
    + 'static {
    // Required method
    fn fire(&self, event: &PhaseEndEvent);

    // Provided method
    fn name(&self) -> &str { ... }
}
Expand description

Trigger callback. Implementors fire whenever a phase completes (success or failure). The implementation should be cheap to set up — long work runs on the worker thread, not the executor.

Required Methods§

Source

fn fire(&self, event: &PhaseEndEvent)

Fire the trigger. event carries the phase identity and outcome; the implementation reads whatever live state it needs (the session db, the metrics dir) on its own.

Provided Methods§

Source

fn name(&self) -> &str

Human-readable trigger name for logging / debugging. Default returns the type name via Any downcast hint.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§