Type Alias tokenbucket::TokenAcquisitionResult
source · pub type TokenAcquisitionResult = Result<f64, f64>;
Expand description
Represents the acquisition result from a call to TokenBucket.acquire().
Err() is called if the number of tokens desired is not currently available in the bucket. Otherwise, Ok() is called.
Both Ok() and Err() will supply the current rate of the Bucket in tokens acquired per second.
Aliased Type§
enum TokenAcquisitionResult {
Ok(f64),
Err(f64),
}