Skip to main content

distkit/
lib.rs

1#![doc = include_str!("../docs/lib.md")]
2#![cfg_attr(docsrs, feature(doc_cfg), warn(rustdoc::broken_intra_doc_links))]
3#![deny(missing_docs)]
4#![forbid(unsafe_code)]
5
6mod common;
7pub use common::*;
8#[cfg(feature = "counter")]
9pub mod counter;
10
11#[cfg(feature = "instance-aware-counter")]
12pub mod icounter;
13
14/// Rate limiting via the [`trypema`](https://docs.rs/trypema) crate.
15///
16/// This module re-exports all public types from `trypema`, providing
17/// sliding-window rate limiting with local, Redis-backed, and hybrid
18/// providers. Enable the `trypema` feature to use this module.
19#[cfg(feature = "trypema")]
20#[cfg_attr(docsrs, doc(cfg(feature = "trypema")))]
21pub mod trypema;
22
23mod error;
24pub use error::*;
25
26#[cfg(all(feature = "counter", feature = "instance-aware-counter"))]
27#[doc(hidden)]
28pub mod __doctest_helpers;