Expand description
Umbrella crate for the Reliakit reliability toolkit.
This crate has no logic of its own. It re-exports the individual reliakit-*
crates behind feature flags so you can depend on a single name and enable
only the building blocks you need. Nothing is pulled in by default beyond the
std flag; each module below appears only when its feature is enabled.
Add it and pick the pieces you want:
reliakit = { version = "0.1", features = ["ratelimit", "secret"] }use reliakit::ratelimit::RateLimiter;
use reliakit::secret::SecretString;
let mut limiter = RateLimiter::new(5, 1, 1);
assert!(limiter.try_acquire_one(0));
let api_key = SecretString::from_string("rk_live_value");
assert_eq!(format!("{api_key}"), "[REDACTED]");For no_std, disable default features and add alloc where a module needs
owned storage:
reliakit = { version = "0.1", default-features = false, features = ["alloc", "primitives"] }§Features
| Feature | Re-exports |
|---|---|
core | reliakit_core as core; also enables the clock-aware *_now methods of any enabled resilience crate |
primitives | reliakit_primitives as primitives |
secret | reliakit_secret as secret |
validate | reliakit_validate as validate |
collections | reliakit_collections as collections |
codec | reliakit_codec as codec |
backoff | reliakit_backoff as backoff |
circuit | reliakit_circuit as circuit |
ratelimit | reliakit_ratelimit as ratelimit |
timeout | reliakit_timeout as timeout |
json | reliakit_json as json |
derive | reliakit_derive as derive |
decide | reliakit_decide as decide |
full | all of the above |
std (on by default) implies alloc; both forward to the enabled crates.
The integration features json-canonical, json-primitives, json-validate,
and codec-primitives turn on the matching cross-crate features.
Re-exports§
pub use reliakit_core as core;pub use reliakit_primitives as primitives;pub use reliakit_secret as secret;pub use reliakit_validate as validate;pub use reliakit_collections as collections;pub use reliakit_codec as codec;pub use reliakit_backoff as backoff;pub use reliakit_circuit as circuit;pub use reliakit_ratelimit as ratelimit;pub use reliakit_timeout as timeout;pub use reliakit_json as json;pub use reliakit_derive as derive;pub use reliakit_decide as decide;