#[non_exhaustive]pub struct RateLimit {
pub limit: i32,
pub remaining: i32,
pub restore_rate: i32,
pub reset_at: Option<DateTime<Utc>>,
}
Expand description
Rate limiting information.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.limit: i32
§remaining: i32
§restore_rate: i32
§reset_at: Option<DateTime<Utc>>
Implementations§
Source§impl RateLimit
impl RateLimit
pub fn with_limit(self, val: i32) -> Self
pub fn with_remaining(self, val: i32) -> Self
pub fn with_restore_rate(self, val: i32) -> Self
pub fn with_reset_at(self, val: Option<DateTime<Utc>>) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RateLimit
impl<'de> Deserialize<'de> for RateLimit
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RateLimit
impl RefUnwindSafe for RateLimit
impl Send for RateLimit
impl Sync for RateLimit
impl Unpin for RateLimit
impl UnwindSafe for RateLimit
Blanket Implementations§
Source§impl<Data> ApiSuccessResponse for Data
impl<Data> ApiSuccessResponse for Data
fn api_response<Meta>(self, meta: Option<Meta>) -> ApiResponse<Self, Meta>
fn api_response_without_meta<Meta>(self) -> ApiResponse<Self, Meta>
fn api_response_with_meta<Meta>(self, meta: Meta) -> ApiResponse<Self, Meta>
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