pub trait AsTokens { // Required methods fn capacity(&self) -> usize; fn rate(&self) -> f64; }
Any type that can be assigned a number of rate-limit tokens.
Get the token capacity for this object.
Get the refill rate for this object. A rate of 1.0 means one token per second.
1.0