Expand description
Rate-limit policy and storage trait (RFC-008).
Short human-friendly codes must be protected against online guessing. codlet’s rate-limit model is:
- The host computes a
RateLimitKeyfrom a trustworthy source (e.g. a verified client IP from a trusted proxy header, or a scope+purpose combination). - codlet checks the key before the expensive lookup.
- On a failed redemption, codlet records the failure.
- On a successful redemption, the caller may clear the failures.
codlet never parses network headers. Trustworthiness of the key is the host’s responsibility (RFC-008 §6).
Structs§
- Rate
Limit Key - A rate-limit dimension key supplied by the host (RFC-008 §4).
- Rate
Limit Policy - Rate-limit policy (RFC-008 §4).
Enums§
- Rate
Limit Outcome - The result of a rate-limit check.
- Rate
Limit Unavailable - Behaviour when the rate-limit store is unavailable (RFC-008 §4).
Traits§
- Rate
Limit Store - Rate-limit storage (RFC-008 §4).