pub struct PerfectHash { /* private fields */ }Expand description
A constructed perfect hash table.
Implementations§
Source§impl PerfectHash
impl PerfectHash
Sourcepub fn lookup(&self, key: &str) -> Option<u32>
pub fn lookup(&self, key: &str) -> Option<u32>
Look up a key. O(1): two primary hashes + one verify hash +
two array loads. Returns None if key was not in the
input set.
Sourcepub fn displacement(&self) -> &[u32]
pub fn displacement(&self) -> &[u32]
Displacement table - GPU ReadOnly buffer.
Sourcepub fn key_hashes(&self) -> &[u64]
pub fn key_hashes(&self) -> &[u64]
Key-hash verification table - GPU ReadOnly buffer.
Trait Implementations§
Source§impl Clone for PerfectHash
impl Clone for PerfectHash
Source§fn clone(&self) -> PerfectHash
fn clone(&self) -> PerfectHash
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PerfectHash
impl Debug for PerfectHash
Source§impl Default for PerfectHash
impl Default for PerfectHash
Source§fn default() -> PerfectHash
fn default() -> PerfectHash
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PerfectHash
impl RefUnwindSafe for PerfectHash
impl Send for PerfectHash
impl Sync for PerfectHash
impl Unpin for PerfectHash
impl UnsafeUnpin for PerfectHash
impl UnwindSafe for PerfectHash
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more