shared-framework 0.0.17

Reusable building blocks for HTTP services — Hyper routing, SeaORM data layer, validation, OpenAPI docs, jobs, queues, cache.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Request middlewares: reusable pre-handler hooks for the router.
//!
//! [`Middleware`](crate::controller::Middleware) functions run before handlers and can
//! short-circuit with an [`ErrorResult`](crate::response::ErrorResult). Submodules provide
//! general hooks ([`general`]), request logging ([`monitoring`]), and fixed-window
//! rate limiting ([`rate`]).
//! ```ignore
//! router.mount("/items", 1, "/list", false, Method::GET, desc, handler, vec![]);
//! ```

pub mod general;
pub mod monitoring;
pub mod rate;

pub use rate::{InMemoryRateLimiter, RateLimiter};