actix_rate_limiter/
lib.rs

1//! `actix-rate-limiter` is a simple yet powerful per-route rate limiter for
2//! [Actix](https://docs.rs/actix-web/latest/actix_web/) with support for regex.
3//!
4//! ### Available backends
5//!
6//! Right now, only in-memory storage is supported officially. But you can
7//! create your own backend using the `BackendProvider` trait. You can use
8//! `MemoryBackendProvider` as an example implementation.
9//!
10//! We plan to add support for some other backends in the future, such as Redis.
11//! If you want to help with their development, please checkout our
12//! [GitHub](https://github.com/Pelfox/actix-rate-limiter).
13//!
14//! ### Examples
15//!
16//! Check the examples folder of our repository to see the available code samples.
17//!
18
19#![deny(
20    missing_docs,
21    missing_debug_implementations,
22    missing_copy_implementations,
23    unsafe_code
24)]
25
26pub mod backend;
27pub mod middleware;
28
29pub mod limit;
30pub mod limiter;
31pub mod route;
32
33/// General type for tne ID of the request. It consists of the requester's
34/// identifier and the request's path. Guaranteed format: `{id}:{path}`.
35pub type RequestId = String;