#[non_exhaustive]pub enum KeyErrorPolicy {
Reject,
Bypass,
UseGlobalKey,
}Expand description
What to do when key extraction fails.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Reject
Reject the request, rendering the KeyError through ResponseError. The default.
Bypass
Skip the limiter and forward the request.
UseGlobalKey
Fall back to the namespace-wide shared key, as if Global
were the extractor.
Trait Implementations§
Source§impl Clone for KeyErrorPolicy
impl Clone for KeyErrorPolicy
impl Copy for KeyErrorPolicy
Source§impl Debug for KeyErrorPolicy
impl Debug for KeyErrorPolicy
Source§impl Default for KeyErrorPolicy
impl Default for KeyErrorPolicy
impl Eq for KeyErrorPolicy
Source§impl PartialEq for KeyErrorPolicy
impl PartialEq for KeyErrorPolicy
impl StructuralPartialEq for KeyErrorPolicy
Auto Trait Implementations§
impl Forget for KeyErrorPolicy
impl Freeze for KeyErrorPolicy
impl Move for KeyErrorPolicy
impl RefUnwindSafe for KeyErrorPolicy
impl Send for KeyErrorPolicy
impl Sync for KeyErrorPolicy
impl Unpin for KeyErrorPolicy
impl UnsafeUnpin for KeyErrorPolicy
impl UnwindSafe for KeyErrorPolicy
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