Skip to main content

AbseilConfig

Trait AbseilConfig 

Source
pub trait AbseilConfig: Sized {
    type ConcreteBuildHasher: BuildHasher;
    type ConcreteAllocator: Allocator;

    // Required methods
    fn build_hasher(&self) -> &Self::ConcreteBuildHasher;
    fn allocator_mut(&mut self) -> &mut Self::ConcreteAllocator;
    fn load_factor(&self) -> MaxLoadFactor;

    // Provided method
    fn calculate_partial_hashes<T: Hash>(&self, value: T) -> (u64, u8) { ... }
}
Expand description

The actual Abseil hash table configuration trait.

Required Associated Types§

Required Methods§

Source

fn build_hasher(&self) -> &Self::ConcreteBuildHasher

Source

fn allocator_mut(&mut self) -> &mut Self::ConcreteAllocator

Source

fn load_factor(&self) -> MaxLoadFactor

Provided Methods§

Source

fn calculate_partial_hashes<T: Hash>(&self, value: T) -> (u64, u8)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<TAllocator: Allocator> AbseilConfig for DefaultAbseilConfig<TAllocator>

Source§

type ConcreteBuildHasher = DefaultHashBuilder

Source§

type ConcreteAllocator = TAllocator