[−][src]Struct serenity::http::ratelimiting::Ratelimit
A set of data containing information about the ratelimits for a particular
Route
, which is stored in Http
.
See the Discord docs on ratelimits for more information.
Note: You should not mutate any of the fields, as this can help cause 429s.
Implementations
impl Ratelimit
[src]
pub async fn pre_hook<'_, '_>(&'_ mut self, route: &'_ Route)
[src]
pub async fn post_hook<'_, '_, '_>(
&'_ mut self,
response: &'_ Response,
route: &'_ Route
) -> Result<bool>
[src]
&'_ mut self,
response: &'_ Response,
route: &'_ Route
) -> Result<bool>
pub fn limit(&self) -> i64
[src]
The total number of requests that can be made in a period of time.
pub fn remaining(&self) -> i64
[src]
The number of requests remaining in the period of time.
pub fn reset(&self) -> Option<SystemTime>
[src]
The absolute time in milliseconds when the interval resets.
pub fn reset_after(&self) -> Option<Duration>
[src]
The total time in milliseconds when the interval resets.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Ratelimit
impl Send for Ratelimit
impl Sync for Ratelimit
impl Unpin for Ratelimit
impl UnwindSafe for Ratelimit
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,