servlet 1.1.0

A small application runtime with an explicit operational contract
Documentation
//! Embedded and process-oriented entry points share the same coordinator.

use crate::{Result, Running, lifecycle, process};

use super::App;

impl App<()> {
    /// Start on the current Tokio executor without signals or global logging.
    ///
    /// Waits for deferred setup, each worker's readiness acknowledgment, and each
    /// registered check's first success before opening admission. A check can
    /// become unhealthy again while another startup gate is pending; inspect
    /// [`crate::AppHandle::is_ready`] for current cached readiness.
    ///
    /// Cancelling this future requests rollback in the background. Keep the
    /// executor alive for cleanup; only awaited completion confirms the outcome.
    pub async fn start(self) -> Result<Running> {
        lifecycle::start(self.registration, self.router).await
    }

    /// Install process signal handling, start the application, and await completion.
    ///
    /// SIGTERM and interrupt request the same graceful shutdown as `AppHandle`.
    /// Cancelling this future requests shutdown. It never resizes an executor or
    /// installs a global logging subscriber.
    pub async fn run(self) -> Result<()> {
        process::run_app(self.registration, self.router).await
    }
}