Skip to main content

run_required_startup_phase

Function run_required_startup_phase 

Source
pub async fn run_required_startup_phase<F, Fut, T, E>(
    name: &'static str,
    phase: F,
) -> Result<StartupPhaseOutcome<T>, E>
where F: FnOnce() -> Fut, Fut: Future<Output = Result<T, E>>, E: Display,
Expand description

Runs one required startup phase that returns a product-owned value.

This helper is useful for startup steps that construct resources such as database handles, runtime config snapshots, cache backends, driver registries, or application state. The product error type is preserved while Forge still provides shared tracing and phase reporting.