pub trait LifecycleHook {
// Required method
fn on_event(&self, event: HookEvent) -> Result<HookOutcome, PluginError>;
}Expand description
Implemented by lifecycle-hook plugins.
Required Methods§
Sourcefn on_event(&self, event: HookEvent) -> Result<HookOutcome, PluginError>
fn on_event(&self, event: HookEvent) -> Result<HookOutcome, PluginError>
React to a lifecycle event.
§Errors
Returns a PluginError describing the failure. The host
converts errors into build events; whether the build aborts
depends on the hook’s declared phase.