pub struct RateLimitInfo {
pub used_weight_1m: Option<u64>,
pub used_weight_1s: Option<u64>,
pub order_count_10s: Option<u64>,
pub order_count_1d: Option<u64>,
pub retry_after: Option<u64>,
}Expand description
Rate limit information extracted from response headers.
Fields§
§used_weight_1m: Option<u64>Used weight in the current 1-minute window.
used_weight_1s: Option<u64>Used weight in the current 1-second window.
order_count_10s: Option<u64>Order count in the current 10-second window.
order_count_1d: Option<u64>Order count in the current day.
retry_after: Option<u64>Retry-After header value in seconds (when rate limited).
Implementations§
Source§impl RateLimitInfo
impl RateLimitInfo
Sourcepub fn from_headers(headers: &Value) -> Self
pub fn from_headers(headers: &Value) -> Self
Trait Implementations§
Source§impl Clone for RateLimitInfo
impl Clone for RateLimitInfo
Source§fn clone(&self) -> RateLimitInfo
fn clone(&self) -> RateLimitInfo
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 RateLimitInfo
impl Debug for RateLimitInfo
Source§impl Default for RateLimitInfo
impl Default for RateLimitInfo
Source§fn default() -> RateLimitInfo
fn default() -> RateLimitInfo
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RateLimitInfo
impl RefUnwindSafe for RateLimitInfo
impl Send for RateLimitInfo
impl Sync for RateLimitInfo
impl Unpin for RateLimitInfo
impl UnsafeUnpin for RateLimitInfo
impl UnwindSafe for RateLimitInfo
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