20 releases

Uses old Rust 2015

0.4.4 Oct 29, 2018
0.4.3 Nov 17, 2017
0.4.2 Sep 2, 2017
0.4.1 Jun 3, 2017
0.1.9 Nov 9, 2015

#119 in Concurrency

Download history 263/week @ 2021-07-02 293/week @ 2021-07-09 224/week @ 2021-07-16 237/week @ 2021-07-23 265/week @ 2021-07-30 243/week @ 2021-08-06 196/week @ 2021-08-13 219/week @ 2021-08-20 188/week @ 2021-08-27 170/week @ 2021-09-03 216/week @ 2021-09-10 220/week @ 2021-09-17 193/week @ 2021-09-24 230/week @ 2021-10-01 336/week @ 2021-10-08 222/week @ 2021-10-15

2,233 downloads per month
Used in 5 crates

MIT/Apache

23KB
359 lines

ratelimit - a token bucket ratelimiter for rust

ratelimit provides a token bucket ratelimiter which can be used by a single thread, or shared across threads by using a channel to push tokens to the ratelimiter

The API documentation of this library can be found at docs.rs/ratelimit.

conduct-badge travis-badge downloads-badge release-badge license-badge

Code of Conduct

NOTE: All conversations and contributions to this project shall adhere to the Code of Conduct

Usage

To use ratelimit, first add this to your Cargo.toml:

[dependencies]
ratelimit = "*"

Then, add this to your crate root:

extern crate ratelimit;

Features

  • token bucket ratelimiter
  • single or multi threaded uses

Future work

  • additional ratelimiter models

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

No runtime deps