rate-guard 0.1.0

Thread-safe rate limiting library with multiple algorithms and Duration-based configuration
Documentation
[dependencies.rate-guard-core]
default-features = false
version = "0.7.2"

[dependencies.tokio]
features = ["time"]
optional = true
version = "1.0"

[dev-dependencies.tokio]
features = ["rt", "rt-multi-thread", "time", "macros", "test-util"]
version = "1.0"

[[example]]
name = "approx_sliding_window_async"
path = "examples/approx_sliding_window_async.rs"
required-features = ["tokio-time"]

[[example]]
name = "approx_sliding_window_sync"
path = "examples/approx_sliding_window_sync.rs"
required-features = ["std-time"]

[[example]]
name = "fixed_window_counter_async"
path = "examples/fixed_window_counter_async.rs"
required-features = ["tokio-time"]

[[example]]
name = "fixed_window_counter_sync"
path = "examples/fixed_window_counter_sync.rs"
required-features = ["std-time"]

[[example]]
name = "sliding_window_counter_async"
path = "examples/sliding_window_counter_async.rs"
required-features = ["tokio-time"]

[[example]]
name = "sliding_window_counter_sync"
path = "examples/sliding_window_counter_sync.rs"
required-features = ["std-time"]

[[example]]
name = "token_bucket_async"
path = "examples/token_bucket_async.rs"
required-features = ["tokio-time"]

[[example]]
name = "token_bucket_sync"
path = "examples/token_bucket_sync.rs"
required-features = ["std-time"]

[features]
default = ["tick-u64"]
std-time = []
tick-u128 = ["rate-guard-core/tick-u128"]
tick-u64 = ["rate-guard-core/tick-u64"]
tokio-time = ["tokio"]

[lib]
name = "rate_guard"
path = "src/lib.rs"

[package]
authors = ["KuanLinChen <kuan.lyn.chen@gmail.com>"]
autobenches = false
autobins = false
autoexamples = false
autolib = false
autotests = false
build = false
categories = ["algorithms", "concurrency", "network-programming", "web-programming"]
description = "Thread-safe rate limiting library with multiple algorithms and Duration-based configuration"
documentation = "https://docs.rs/rate-guard"
edition = "2021"
exclude = ["Cargo.toml.orig"]
homepage = "https://github.com/kuanlin/rate-guard"
keywords = ["rate-limiting", "token-bucket", "algorithms", "throttling"]
license = "MIT OR Apache-2.0"
name = "rate-guard"
readme = "README.md"
repository = "https://github.com/kuanlin/rate-guard"
rust-version = "1.70.0"
version = "0.1.0"

[package.metadata.docs.rs]
all-features = false
features = ["std-time", "tokio-time"]
rustdoc-args = ["--cfg", "docsrs"]

[[test]]
name = "build_error_tests"
path = "tests/build_error_tests.rs"

[[test]]
name = "doc_examples_test"
path = "tests/doc_examples_test.rs"

[[test]]
name = "test_approximate_sliding_window"
path = "tests/test_approximate_sliding_window.rs"

[[test]]
name = "test_fixed_window_counter"
path = "tests/test_fixed_window_counter.rs"

[[test]]
name = "test_sliding_window_counter"
path = "tests/test_sliding_window_counter.rs"

[[test]]
name = "test_std_time_source_async"
path = "tests/test_std_time_source_async.rs"

[[test]]
name = "test_std_time_source_sync"
path = "tests/test_std_time_source_sync.rs"

[[test]]
name = "test_token_bucket"
path = "tests/test_token_bucket.rs"

[[test]]
name = "test_tokio_time_source"
path = "tests/test_tokio_time_source.rs"