pub struct Quota {
pub events_per_window: Option<u32>,
pub window_ms: u64,
}Expand description
The limits, and the window they are counted over.
Fields§
§events_per_window: Option<u32>How many events one bucket may add to the log per window. None disables the quota.
window_ms: u64How long a window is, in milliseconds.
Implementations§
Trait Implementations§
Source§impl Default for Quota
impl Default for Quota
Source§fn default() -> Self
fn default() -> Self
“On by default with generous limits” — F3’s own words, with numbers attached.
600 events a minute, which is ten a second sustained. The number is chosen from what a person can produce: a fast typist committing a todo per keystroke does not reach it, and a UI that batches at all is nowhere near. It is deliberately far above any interactive use and far below what a script can do in a second, which is the gap F3 asks to be closed.
It is generous for the reason the module doc gives as well: two actors can share a bucket, so the limit has to be ample for both and still bite a script.
impl Copy for Quota
impl Eq for Quota
impl StructuralPartialEq for Quota
Auto Trait Implementations§
impl Freeze for Quota
impl RefUnwindSafe for Quota
impl Send for Quota
impl Sync for Quota
impl Unpin for Quota
impl UnwindSafe for Quota
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.