//! Middleware trait: IMiddleware.
use crateResult;
use crateIHttpContext;
use ControlFlow;
/// Middleware component in the HTTP request pipeline.
///
/// Middlewares are called in registration order. Each middleware can:
/// - Inspect/modify the request before passing through
/// - Short-circuit by returning `ControlFlow::Break(())`
/// - The pipeline continues to the next middleware on `ControlFlow::Continue(())`
///
/// On short-circuit, remaining middleware and the final handler are skipped,
/// but `after` hooks on already-executed middleware still run in reverse order.
///
/// Analogous to ASP.NET Core's IMiddleware.