Skip to main content

MICROS_PER_TOKEN

Constant MICROS_PER_TOKEN 

Source
pub const MICROS_PER_TOKEN: u64 = 1_000_000;
Expand description

Micro-tokens to one token: the resolution the bucket stores its rate, burst and balance in.

A millionth of a token per second is the smallest positive rate the bucket holds. A micro-token count fits a u64 up to about 1.8e13 tokens, which is a larger burst than any quota window of a 64-bit byte rate reaches in practice, and every larger value saturates.