Struct eternity::RateLimitInfo[][src]

pub struct RateLimitInfo<Value: Clone> {
    pub rate_limit: Duration,
    pub active_delays: u32,
    pub is_first_try: bool,
    pub action: RateLimitAction,
    pub cached: Option<Value>,
}

Describes the rate limit encountered.

If this value is returned, the callee informs about a rate limit.

The term hit represents one attempt to hit the rate limit.

Fields

rate_limit: Duration

Time to elapse in order to invoke a command again.

active_delays: u32

Amount of active delays by this target.

is_first_try: bool

Whether this is the first time the rate limit info has been returned for the bucket without the rate limit to elapse.

action: RateLimitAction

Action taken for this rate limit. Delay never occurs, as a value is returned after awaiting the delay.

cached: Option<Value>

If a value has been cached, this field will yield a value.

Trait Implementations

impl<Value: Clone> Clone for RateLimitInfo<Value>[src]

impl<Value: Debug + Clone> Debug for RateLimitInfo<Value>[src]

Auto Trait Implementations

impl<Value> RefUnwindSafe for RateLimitInfo<Value> where
    Value: RefUnwindSafe

impl<Value> Send for RateLimitInfo<Value> where
    Value: Send

impl<Value> Sync for RateLimitInfo<Value> where
    Value: Sync

impl<Value> Unpin for RateLimitInfo<Value> where
    Value: Unpin

impl<Value> UnwindSafe for RateLimitInfo<Value> where
    Value: UnwindSafe

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.