[][src]Struct ratelimit_meter::example_algorithms::Always

pub struct Always();

A pseudo-instant that never changes.

It is used to implement the Allower rate-limiter type, which never denies any requests.

Trait Implementations

impl Algorithm<Always> for Allower[src]

type BucketState = ()

The state of a single rate limiting bucket. Read more

type NegativeDecision = Impossible

The type returned when a rate limiting decision for a single cell is negative. Each rate limiting algorithm can decide to return the type that suits it best, but most algorithms' decisions also implement NonConformance, to ease handling of how long to wait. Read more

fn test_n_and_update(
    &self,
    _state: &Self::BucketState,
    _n: u32,
    _t0: Always
) -> Result<(), NegativeMultiDecision<Impossible>>
[src]

Allows all cells through unconditionally.

impl RateLimitState<Allower, Always> for ()[src]

impl Reference for Always[src]

impl Clone for Always[src]

impl PartialOrd<Always> for Always[src]

impl Copy for Always[src]

impl Eq for Always[src]

impl Ord for Always[src]

impl PartialEq<Always> for Always[src]

impl Debug for Always[src]

impl Sub<Duration> for Always[src]

type Output = Always

The resulting type after applying the - operator.

impl Add<Duration> for Always[src]

type Output = Always

The resulting type after applying the + operator.

Auto Trait Implementations

impl Send for Always

impl Sync for Always

impl Unpin for Always

impl RefUnwindSafe for Always

impl UnwindSafe for Always

Blanket Implementations

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.

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

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

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