footing 0.1.7

Feature-gated foundations for Rust backend services
Documentation
//! Lightweight result aliases and stable error classification.
//!
//! `footing` keeps error classification independent from HTTP so libraries can
//! attach stable operational meaning to failures without depending on Axum.
//! HTTP adapters can map [`ErrorKind`] to status codes and problem responses at
//! the boundary.
//!
//! ```rust
//! use footing::result::{ErrorCode, ErrorDescriptor, ErrorKind};
//!
//! let descriptor = ErrorDescriptor::new(
//!     ErrorKind::Validation,
//!     ErrorCode::try_new("invalid_request").unwrap(),
//!     "request validation failed",
//! );
//!
//! assert_eq!(descriptor.kind(), ErrorKind::Validation);
//! assert!(!descriptor.retryable());
//! ```
//!

mod classification;
mod diagnostic;

pub use classification::{
    BoxError, ClassifyError, DEFAULT_ERROR_CODE, ErrorBoundaryDecision, ErrorBoundaryPolicy,
    ErrorCode, ErrorCodeError, ErrorDescriptor, ErrorKind, ErrorLogLevel, ErrorVisibility,
    MAX_ERROR_CODE_LENGTH, Result, generic_error_message,
};
pub use diagnostic::{Diagnostic, DiagnosticKind, MAX_DIAGNOSTIC_FIELD_LENGTH, Remediation};

#[cfg(test)]
mod tests;