servlet 1.1.0

A small application runtime with an explicit operational contract
Documentation
//! Operation failures expose native SQLx errors only through an explicit accessor.

/// A bounded operation's outcome; neither Display nor Debug exposes SQL or binds.
#[non_exhaustive]
pub enum PgOperationError {
    /// The requested absolute deadline is more than 24 hours away.
    InvalidDeadline,
    /// The original deadline expired, including during pool acquisition.
    Deadline,
    /// Native pool acquisition failed before the operation deadline.
    Acquire(super::Error),
    /// The application query/transaction future returned a native SQLx error.
    Query(super::Error),
}
impl PgOperationError {
    /// Explicit access to native details, which may contain sensitive server/SQL data.
    pub fn native(&self) -> Option<&super::Error> {
        match self {
            Self::Acquire(error) | Self::Query(error) => Some(error),
            _ => None,
        }
    }
}
impl std::fmt::Debug for PgOperationError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        std::fmt::Display::fmt(self, f)
    }
}
impl std::fmt::Display for PgOperationError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        f.write_str(match self {
            Self::InvalidDeadline => "PostgreSQL operation deadline exceeds 24 hours",
            Self::Deadline => "PostgreSQL operation deadline expired",
            Self::Acquire(_) => "PostgreSQL operation acquisition failed",
            Self::Query(_) => "PostgreSQL operation query failed",
        })
    }
}
impl std::error::Error for PgOperationError {}