xlimit 0.1.0

Lightweight in-memory rate limiting library in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# xlimit

Lightweight in-memory rate limiting library in Rust.

## Usage

```rust
let mut limiter = xlimit::Limiter::new(10, std::time::Duration::from_secs(1));
if limiter.allow("user_123") {
    println!("Allowed");
} else {
    println!("Rate limit exceeded");
}
```