servlet 1.0.0

A small application runtime with an explicit operational contract
Documentation
//! Managed errors contain fixed categories, never credentials or server diagnostics.

/// Failure at the managed PostgreSQL boundary. Native SQLx query errors stay native.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[non_exhaustive]
pub enum PgError {
    /// Invalid explicit configuration.
    Configuration,
    /// Ambient PG settings would override explicit connection policy.
    AmbientConfiguration,
    /// Resource, readiness, or metric registration was rejected.
    Registration,
    /// The database could not initialize; credentials and server details are omitted.
    Initialization,
    /// The shared startup or configured connection allowance expired.
    StartupTimeout,
    /// Startup was cancelled.
    Cancelled,
}
impl std::fmt::Display for PgError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(match self {
            Self::Configuration => "invalid managed PostgreSQL configuration",
            Self::AmbientConfiguration => {
                "ambient PG settings are not supported by managed PostgreSQL"
            }
            Self::Registration => "managed PostgreSQL registration rejected",
            Self::Initialization => "managed PostgreSQL initialization failed",
            Self::StartupTimeout => "managed PostgreSQL startup allowance expired",
            Self::Cancelled => "managed PostgreSQL startup cancelled",
        })
    }
}
impl std::error::Error for PgError {}