Crate eternity[−][src]
This crate ensures rate limits and can return cached results instead.
Caching is an optional mechanism helping to avoid repeated expensive procedures, such as REST requests and calcuations, until certain time elapsed.
Nonetheless, as it’s an optional feature, one can simply use the rate limiter for nothing but throttling, e.g. bot commands, without using memory on caching.
Modules
multi_bucket | A multi-bucket type uses groups of buckets. Each group represents a category, e.g. a command name or HTTP endpoint, which then contains buckets. The buckets represent individual identities, such as the command user’s ID or the endpoint parameters. |
Structs
Bucket | This type checks for rate limits on |
BucketBuilder | Builds a |
RateLimitInfo | Describes the rate limit encountered. |
Enums
RateLimitAction | Action taken for the command invocation. |