pub enum Admit {
Allowed,
Limited(&'static str),
Error,
}Expand description
The outcome of consulting a limiter.
Variants§
Allowed
Within the limit — proceed.
Limited(&'static str)
Over the limit — reject with 429; the scope (ip/route/key) names which limit.
Error
The store failed and fail_open is off — reject with 503.
Trait Implementations§
impl Copy for Admit
impl Eq for Admit
impl StructuralPartialEq for Admit
Auto Trait Implementations§
impl Freeze for Admit
impl RefUnwindSafe for Admit
impl Send for Admit
impl Sync for Admit
impl Unpin for Admit
impl UnsafeUnpin for Admit
impl UnwindSafe for Admit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.