#[non_exhaustive]pub struct RateLimits {
pub enabled: bool,
pub per_ip: u32,
pub ip_burst: u32,
pub per_key: u32,
pub verify_per_ip: u32,
pub calc_per_ip: u32,
pub batch_cells_per_token: u32,
pub series_per_ip: u32,
}Expand description
Rate limits (token buckets), per minute. Refused requests are answered rate_limited
with retry_after_seconds and Retry-After; nothing is ever queued.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.enabled: boolWhether limits apply at all (default true).
per_ip: u32Requests per minute per client IP without an API key (default 60).
ip_burst: u32The burst per IP: the bucket’s capacity (default 120).
per_key: u32Requests per minute per API key, unless the key’s own line says otherwise (default 600; the burst is the same number).
verify_per_ip: u32POST /verify per minute per IP, with or without a key (default 60; burst the same).
calc_per_ip: u32POST /x/calc per minute per IP, with or without a key (default 30; burst the same). Its
own bucket, taken after the per-IP limit (Build 2 Part 3, calc).
batch_cells_per_token: u32Cells per request token in a POST /cells batch (default 50: a batch of 1,000 cells
counts as 20 requests).
series_per_ip: u32/series pages per minute per IP, besides the per-IP limit (DATUMESH_RATE_SERIES_PER_IP,
default 30; burst the same), so that a crawler that misses the cache cannot load the mesh.
Trait Implementations§
Source§impl Clone for RateLimits
impl Clone for RateLimits
Source§impl Debug for RateLimits
impl Debug for RateLimits
Source§impl Default for RateLimits
impl Default for RateLimits
impl Eq for RateLimits
Source§impl PartialEq for RateLimits
impl PartialEq for RateLimits
impl StructuralPartialEq for RateLimits
Auto Trait Implementations§
impl Forget for RateLimits
impl Freeze for RateLimits
impl Move for RateLimits
impl RefUnwindSafe for RateLimits
impl Send for RateLimits
impl Sync for RateLimits
impl Unpin for RateLimits
impl UnsafeUnpin for RateLimits
impl UnwindSafe for RateLimits
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.