Trait Keyer

Source
pub trait Keyer {
    type Key;

    // Required method
    fn get_key(&self, request: &Request<Body>) -> Self::Key;
}
Expand description

The trait for objects used to obtain cache keys. See BasicKeyer for default implementation returning (http::Method, Uri).

Required Associated Types§

Required Methods§

Source

fn get_key(&self, request: &Request<Body>) -> Self::Key

Implementors§

Source§

impl Keyer for BasicKeyer

Source§

impl<K, F> Keyer for F
where F: Fn(&Request<Body>) -> K + Send + Sync + 'static,

Source§

type Key = K