gw2lib 3.0.2

A simple to use Gw2 API wrapper library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::time::Duration;

use async_trait::async_trait;

use crate::{rate_limit::RateLimiter, EndpointError};

pub struct NoopRateLimiter;
#[async_trait]
impl RateLimiter for NoopRateLimiter {
    async fn take(&self, _num: usize) -> Result<Duration, EndpointError> {
        Ok(Duration::ZERO)
    }

    async fn penalize(&self) -> Result<(), EndpointError> {
        Ok(())
    }
}