rune_alloc::hashbrown

Trait HasherFn

Source
pub trait HasherFn<C: ?Sized, T: ?Sized, E> {
    // Required method
    fn hash(&self, cx: &mut C, key: &T) -> Result<u64, E>;
}
Expand description

Trait used to implement custom hash implementations which are not solely based on traits.

Required Methods§

Source

fn hash(&self, cx: &mut C, key: &T) -> Result<u64, E>

Implementors§

Source§

impl<T, C: ?Sized, K, V, E> HasherFn<C, (K, V), E> for TupleFn<T, V>
where T: HasherFn<C, K, E>,

Source§

impl<U, C: ?Sized, T: ?Sized, E> HasherFn<C, T, E> for U
where U: Fn(&mut C, &T) -> Result<u64, E>,