pub struct CuckooTableOptions { /* private fields */ }
Expand description

Configuration of cuckoo-based storage.

Implementations§

source§

impl CuckooTableOptions

source

pub fn set_hash_ratio(&mut self, ratio: f64)

Determines the utilization of hash tables. Smaller values result in larger hash tables with fewer collisions. Default: 0.9

source

pub fn set_max_search_depth(&mut self, depth: u32)

A property used by builder to determine the depth to go to to search for a path to displace elements in case of collision. See Builder.MakeSpaceForKey method. Higher values result in more efficient hash tables with fewer lookups but take more time to build. Default: 100

source

pub fn set_cuckoo_block_size(&mut self, size: u32)

In case of collision while inserting, the builder attempts to insert in the next cuckoo_block_size locations before skipping over to the next Cuckoo hash function. This makes lookups more cache friendly in case of collisions. Default: 5

source

pub fn set_identity_as_first_hash(&mut self, flag: bool)

If this option is enabled, user key is treated as uint64_t and its value is used as hash value directly. This option changes builder’s behavior. Reader ignore this option and behave according to what specified in table property. Default: false

source

pub fn set_use_module_hash(&mut self, flag: bool)

If this option is set to true, module is used during hash calculation. This often yields better space efficiency at the cost of performance. If this option is set to false, # of entries in table is constrained to be power of two, and bit and is used to calculate hash, which is faster in general. Default: true

Trait Implementations§

source§

impl Default for CuckooTableOptions

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Drop for CuckooTableOptions

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl Send for CuckooTableOptions

source§

impl Sync for CuckooTableOptions

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.