Struct stretto::TransparentKeyBuilder
source · [−]pub struct TransparentKeyBuilder<K: TransparentKey> { /* private fields */ }Expand description
TransparentKeyBuilder converts key to u64.
If the key does not implement the trait TransparentKey, please use DefaultKeyBuilder
or write a custom key builder.
Trait Implementations
sourceimpl<K: Clone + TransparentKey> Clone for TransparentKeyBuilder<K>
impl<K: Clone + TransparentKey> Clone for TransparentKeyBuilder<K>
sourcefn clone(&self) -> TransparentKeyBuilder<K>
fn clone(&self) -> TransparentKeyBuilder<K>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl<K: Debug + TransparentKey> Debug for TransparentKeyBuilder<K>
impl<K: Debug + TransparentKey> Debug for TransparentKeyBuilder<K>
sourceimpl<K: Default + TransparentKey> Default for TransparentKeyBuilder<K>
impl<K: Default + TransparentKey> Default for TransparentKeyBuilder<K>
sourcefn default() -> TransparentKeyBuilder<K>
fn default() -> TransparentKeyBuilder<K>
Returns the “default value” for a type. Read more
sourceimpl<K: TransparentKey> KeyBuilder<K> for TransparentKeyBuilder<K>
impl<K: TransparentKey> KeyBuilder<K> for TransparentKeyBuilder<K>
sourcefn hash_index(&self, key: &K) -> u64
fn hash_index(&self, key: &K) -> u64
hash_index is used to hash the key to u64
sourcefn hash_conflict(&self, _key: &K) -> u64
fn hash_conflict(&self, _key: &K) -> u64
if you want a 128bit hashes, you should implement this method, or leave this method return 0 Read more
sourceimpl<K: PartialEq + TransparentKey> PartialEq<TransparentKeyBuilder<K>> for TransparentKeyBuilder<K>
impl<K: PartialEq + TransparentKey> PartialEq<TransparentKeyBuilder<K>> for TransparentKeyBuilder<K>
sourcefn eq(&self, other: &TransparentKeyBuilder<K>) -> bool
fn eq(&self, other: &TransparentKeyBuilder<K>) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &TransparentKeyBuilder<K>) -> bool
fn ne(&self, other: &TransparentKeyBuilder<K>) -> bool
This method tests for !=.
impl<K: Copy + TransparentKey> Copy for TransparentKeyBuilder<K>
impl<K: Eq + TransparentKey> Eq for TransparentKeyBuilder<K>
impl<K: TransparentKey> StructuralEq for TransparentKeyBuilder<K>
impl<K: TransparentKey> StructuralPartialEq for TransparentKeyBuilder<K>
Auto Trait Implementations
impl<K> RefUnwindSafe for TransparentKeyBuilder<K> where
K: RefUnwindSafe,
impl<K> Send for TransparentKeyBuilder<K> where
K: Send,
impl<K> Sync for TransparentKeyBuilder<K> where
K: Sync,
impl<K> Unpin for TransparentKeyBuilder<K> where
K: Unpin,
impl<K> UnwindSafe for TransparentKeyBuilder<K> where
K: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more