[][src]Trait carapax_ratelimit::RateLimitKey

pub trait RateLimitKey {
type Key: Clone + Eq + Hash;
    fn get_key(&self, update: &Update) -> Option<Self::Key>;
}

A key to filter updates

Associated Types

type Key: Clone + Eq + Hash

Type of the key

Loading content...

Required methods

fn get_key(&self, update: &Update) -> Option<Self::Key>

Returns a key from given update

Considered missing when None is returned

Loading content...

Implementors

impl RateLimitKey for RateLimitList[src]

type Key = RateLimitListKey

impl<F, K> RateLimitKey for F where
    F: Fn(&Update) -> Option<K>,
    K: Clone + Eq + Hash
[src]

type Key = K

Loading content...