pub enum KeyExtractor {
ConstantKey(String),
Header(String),
PathAndMethod,
}Variants§
Trait Implementations§
Source§impl Clone for KeyExtractor
impl Clone for KeyExtractor
Source§impl Debug for KeyExtractor
impl Debug for KeyExtractor
Source§impl From<KeyConfig> for KeyExtractor
impl From<KeyConfig> for KeyExtractor
Source§impl KeyOf<KeyExtractor> for Request<Bytes>
impl KeyOf<KeyExtractor> for Request<Bytes>
Source§fn rate_key<'a>(&'a self, extractor: &'a KeyExtractor) -> Cow<'a, [u8]>
fn rate_key<'a>(&'a self, extractor: &'a KeyExtractor) -> Cow<'a, [u8]>
The bucket key for this input given the extractor config.
Source§fn build_rejection(action: &ExceededAction) -> Response<Bytes>
fn build_rejection(action: &ExceededAction) -> Response<Bytes>
Constructs the rejection output. Called only when the bucket is empty.
Auto Trait Implementations§
impl Freeze for KeyExtractor
impl RefUnwindSafe for KeyExtractor
impl Send for KeyExtractor
impl Sync for KeyExtractor
impl Unpin for KeyExtractor
impl UnsafeUnpin for KeyExtractor
impl UnwindSafe for KeyExtractor
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