with_hasher

Function with_hasher 

Source
pub unsafe fn with_hasher<K, V, M, S>(
    meta: M,
    hasher: S,
) -> (WriteHandle<K, V, M, S>, ReadHandle<K, V, M, S>)
where K: Eq + Hash + Clone, V: Eq + Hash, M: 'static + Clone, S: BuildHasher + Clone,
Expand description

Create an empty eventually consistent map with meta information and custom hasher.

Use the Options builder for more control over initialization.

ยงSafety

This method is safe to call as long as the implementation of Hash and Eq for both K and V, and the implementation of BuildHasher for S and Hasher for S::Hasher are deterministic. That is, they must always yield the same result if given the same inputs. For keys of type K and hashers of type S, their behavior must also be consistent between different clones of the same value.