#[non_exhaustive]pub struct RateLimits { /* private fields */ }Expand description
Process-wide rate limits. Hard-coded; not configurable.
Construct only via RateLimits::HARD_CODED. The struct fields are
pub(crate) so downstream code cannot synthesize a RateLimits with
different values, which would weaken docs/LEGAL.md §6 safeguard 8.
Implementations§
Source§impl RateLimits
impl RateLimits
Sourcepub const HARD_CODED: Self
pub const HARD_CODED: Self
The single, hard-coded set of rate limits. There is no other public constructor — see the type-level docs.
Sourcepub const fn max_concurrent_fetches(&self) -> u32
pub const fn max_concurrent_fetches(&self) -> u32
Maximum number of concurrent fetches in flight.
Sourcepub const fn max_fetches_per_second(&self) -> f32
pub const fn max_fetches_per_second(&self) -> f32
Maximum fetch attempts per second across all sources.
Sourcepub const fn per_source_backoff_ms(&self) -> u64
pub const fn per_source_backoff_ms(&self) -> u64
Per-source backoff in milliseconds between consecutive requests.
Trait Implementations§
Source§impl Clone for RateLimits
impl Clone for RateLimits
Source§fn clone(&self) -> RateLimits
fn clone(&self) -> RateLimits
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RateLimits
impl Debug for RateLimits
impl Copy for RateLimits
Auto Trait Implementations§
impl Freeze 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§
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
Mutably borrows from an owned value. Read more