resilient 0.1.0

A Rust resilience library providing retry, circuit breaker, timeout, bulkhead, and rate limiting policies
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use thiserror::Error;

#[derive(Error, Debug)]
pub enum RateLimitError {
    #[error("Rate limit exceeded: no tokens available")]
    RateLimited,
}

#[derive(Error, Debug)]
pub enum RateLimitResult<E> {
    #[error("Rate limit exceeded: no tokens available")]
    RateLimited,

    #[error(transparent)]
    Inner(#[from] E),
}