1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
//! 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:
//!
//! ```toml
//! reliakit = { version = "0.1", features = ["ratelimit", "secret"] }
//! ```
//!
//! ```
//! # // Requires the `ratelimit` and `secret` features (both on under `full`).
//! 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:
//!
//! ```toml
//! 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`] |
//! | `csv` | [`reliakit_csv`] as [`csv`] |
//! | `backoff` | [`reliakit_backoff`] as [`backoff`] |
//! | `retry` | [`reliakit_retry`] as [`retry`] |
//! | `bulkhead` | [`reliakit_bulkhead`] as [`bulkhead`] |
//! | `health` | [`reliakit_health`] as [`health`] |
//! | `circuit` | [`reliakit_circuit`] as [`circuit`] |
//! | `ratelimit` | [`reliakit_ratelimit`] as [`ratelimit`] |
//! | `timeout` | [`reliakit_timeout`] as [`timeout`] |
//! | `json` | [`reliakit_json`] as [`json`] |
//! | `derive` | [`reliakit_derive`] as [`mod@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.
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_csv as csv;
pub use reliakit_backoff as backoff;
pub use reliakit_retry as retry;
pub use reliakit_bulkhead as bulkhead;
pub use reliakit_health as health;
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;