pub enum RateLimitPressure {
Normal,
Warning,
Cutoff,
}Expand description
Threshold levels for rate limit pressure.
Two thresholds:
- 75% — Warning: notify user, everything still passes.
- 90% — Cutoff: non-essential requests (market data) are dropped. Last 10% of budget is reserved exclusively for trading operations.
Variants§
Normal
< 75% utilization — normal operation.
Warning
= 75% — warning notification; all requests still pass.
Cutoff
= 90% — non-essential requests dropped; last 10% reserved for trading.
Implementations§
Source§impl RateLimitPressure
impl RateLimitPressure
Sourcepub fn from_utilization(ratio: f32) -> Self
pub fn from_utilization(ratio: f32) -> Self
Determine pressure level from utilization ratio.
Trait Implementations§
Source§impl Clone for RateLimitPressure
impl Clone for RateLimitPressure
Source§fn clone(&self) -> RateLimitPressure
fn clone(&self) -> RateLimitPressure
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RateLimitPressure
impl Debug for RateLimitPressure
Source§impl Ord for RateLimitPressure
impl Ord for RateLimitPressure
Source§fn cmp(&self, other: &RateLimitPressure) -> Ordering
fn cmp(&self, other: &RateLimitPressure) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for RateLimitPressure
impl PartialEq for RateLimitPressure
Source§fn eq(&self, other: &RateLimitPressure) -> bool
fn eq(&self, other: &RateLimitPressure) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for RateLimitPressure
impl PartialOrd for RateLimitPressure
impl Copy for RateLimitPressure
impl Eq for RateLimitPressure
impl StructuralPartialEq for RateLimitPressure
Auto Trait Implementations§
impl Freeze for RateLimitPressure
impl RefUnwindSafe for RateLimitPressure
impl Send for RateLimitPressure
impl Sync for RateLimitPressure
impl Unpin for RateLimitPressure
impl UnsafeUnpin for RateLimitPressure
impl UnwindSafe for RateLimitPressure
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