pub trait KeyExtractor<'a, T> {
    type Key: Hash;

    // Required method
    fn extract(&self, from: &'a T) -> Self::Key;
}

Required Associated Types§

Required Methods§

source

fn extract(&self, from: &'a T) -> Self::Key

Implementations on Foreign Types§

source§

impl<'a, T: 'a + Hash> KeyExtractor<'a, T> for ()

§

type Key = &'a T

source§

fn extract(&self, from: &'a T) -> Self::Key

Implementors§

source§

impl<'a, T: 'a, U: Hash, F: Fn(&'a T) -> U> KeyExtractor<'a, T> for F

§

type Key = U