Struct serenity::http::ratelimiting::ROUTES []

pub struct ROUTES { /* fields omitted */ }

The routes mutex is a HashMap of each Route and their respective ratelimit information.

See the documentation for RateLimit for more infomation on how the library handles ratelimiting.

Examples

View the reset time of the route for ChannelsId(7):

use serenity::http::ratelimiting::{ROUTES, Route};

let routes = ROUTES.lock().unwrap();

if let Some(route) = routes.get(&Route::ChannelsId(7)) {
    println!("Reset time at: {}", route.lock().unwrap().reset);
}

Methods from __Deref<Target = Arc<Mutex<HashMap<Route, Arc<Mutex<RateLimit>>>>>>

Trait Implementations

impl __Deref for ROUTES

The resulting type after dereferencing.

Dereferences the value.

impl LazyStatic for ROUTES