[]Struct serenity::http::ratelimiting::GLOBAL

pub struct GLOBAL { /* fields omitted */ }

The global mutex is a mutex unlocked and then immediately re-locked prior to every request, to abide by Discord's global ratelimit.

The global ratelimit is the total number of requests that may be made across the entirety of the API within an amount of time. If this is reached, then the global mutex is unlocked for the amount of time present in the "Retry-After" header.

While locked, all requests are blocked until each request can acquire the lock.

The only reason that you would need to use the global mutex is to block requests yourself. This has the side-effect of potentially blocking many of your event handlers or framework commands.

Methods from Deref<Target = Arc<Mutex<()>>>

Trait Implementations

impl Deref for GLOBAL

The resulting type after dereferencing.

Dereferences the value.

impl LazyStatic for GLOBAL

Auto Trait Implementations

impl Send for GLOBAL

impl Sync for GLOBAL

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

impl<T> Erased for T

impl<T> Typeable for T where
    T: Any

Get the TypeId of this object.

impl<T> UnsafeAny for T where
    T: Any