Absolute
Choose absolute strategy when application needs a binary admission decision.

Decisions
Allowed: increment may be recorded.Rejected: increment is not recorded; best-effort backoff metadata is included.
Admission check and increment are not a strict cross-caller transaction. Concurrent callers may temporarily overshoot. Redis operations are individually atomic; overall admission remains best-effort.
Read and update
is_allowed(key)checks admission without recording usage.get(key)returns live total asu64; unknown keys return0without creating state.set_if(...)replaces history only whenRateLimitComparatormatches live total.set_if_preserve_history(...)changes total while retaining newest or oldest history.
Conditional methods return ConditionalSetOutcome: matched, previous_total, and
current_total. Comparator miss changes nothing. Matched updates replace sticky window capacity;
matched zero removes key.
RateLimitComparator supports Always, Eq, Ne, Lt, and Gt. The numeric
variants compare against the current live total. Use conditional updates to reconcile an external
counter, reset a key, or change its stored capacity without a blind overwrite.
use trypema::RateLimitComparator;
let outcome = limiter.set_if(
&key,
&rate,
RateLimitComparator::Lt(used),
used,
);
Use RateLimitComparator::Always for unconditional update through conditional path.
Preserve history
PreserveNewest: reductions consume oldest buckets; increases extend newest bucket.PreserveOldest: reductions consume newest buckets; increases extend oldest bucket.
If gradual load shedding fits better, use suppressed strategy.

