autumn-web 0.3.0

An opinionated, convention-over-configuration web framework for Rust
Documentation
//! Built-in middleware for Autumn applications.
//!
//! Currently provides:
//!
//! - [`RequestIdLayer`] / [`RequestId`] -- assigns a unique UUID v4 to every
//!   incoming HTTP request, available in handler extensions and the
//!   `X-Request-Id` response header.
//! - [`ExceptionFilterLayer`] / [`ExceptionFilter`] -- intercepts error
//!   responses and runs a user-registered filter chain for logging,
//!   transformation, or replacement.
//! - Dev-only live reload helpers used by `autumn dev`.
//!
//! The [`RequestIdLayer`] is applied automatically by
//! [`AppBuilder::run`](crate::app::AppBuilder::run); you do not need to
//! add it manually. The [`ExceptionFilterLayer`] is applied automatically
//! when at least one exception filter is registered via
//! [`AppBuilder::exception_filter`](crate::app::AppBuilder::exception_filter).

pub(crate) mod dev;
pub(crate) mod error_page_filter;
pub(crate) mod exception_filter;
pub(crate) mod metrics;
pub(crate) mod request_id;
#[cfg(feature = "telemetry-otlp")]
pub(crate) mod trace_context;

pub use exception_filter::{AutumnErrorInfo, ExceptionFilter, ExceptionFilterLayer};
pub use metrics::{MetricsCollector, MetricsLayer};
pub use request_id::{RequestId, RequestIdLayer};
#[cfg(feature = "telemetry-otlp")]
pub use trace_context::{TraceContextLayer, TraceContextService};