arcature 2026.2.1

Arcature application framework: a high-level Application facade over the certified Arcature subsystems, with the low-level Axum/Tower escape hatch preserved.
Documentation
use std::future::Future;

use crate::App;
use axum::serve::Listener;

impl App<()> {
    /// Serve the application with caller-driven graceful shutdown.
    ///
    /// Like [`App::serve`], but stops accepting new connections and drains
    /// in-flight requests once `signal` completes. `signal` is any future
    /// that outputs `()`; completion is the shutdown trigger — for example a
    /// `tokio::sync::oneshot::Receiver` or any caller-controlled future.
    ///
    /// Arcature provides no OS signal framework here; the caller owns the
    /// shutdown decision. Returns `Ok(())` after the signal completes and
    /// in-flight work drains.
    pub async fn serve_with_shutdown<L, F>(self, listener: L, signal: F) -> std::io::Result<()>
    where
        L: Listener,
        L::Addr: std::fmt::Debug,
        F: Future<Output = ()> + Send + 'static,
    {
        axum::serve(listener, self.router)
            .with_graceful_shutdown(signal)
            .await
    }
}