Crate elfo_utils
source ·Expand description
A collection of utilities to share among elfo-* crates.
Modules§
- Provides
Instant
andSystemTime
types.
Macros§
- A simple macro to check if a cooldown period has passed since the last time.
- Returns the contents of a
Option<T>
’sSome(T)
, otherwise it returns early from the function. Can alternatively have anelse
branch, or an alternative “early return” statement, likebreak
orcontinue
for loops.
Structs§
- Pads and aligns a value to the length of a cache line.
- A rate limiter implementing GCRA.
Enums§
- A rate limit configuration.
Functions§
- Hints the compiler that this branch is likely to be taken.
- Hints the compiler that this branch is unlikely to be taken.