pub struct Options<M, S>where
S: BuildHasher,{ /* private fields */ }
Expand description
Options for how to initialize the map.
In particular, the options dictate the hashing function, meta type, and initial capacity of the map.
Implementations
sourceimpl<M, S> Options<M, S>where
S: BuildHasher,
impl<M, S> Options<M, S>where
S: BuildHasher,
sourcepub fn with_hasher<S2>(self, hash_builder: S2) -> Options<M, S2>where
S2: BuildHasher,
pub fn with_hasher<S2>(self, hash_builder: S2) -> Options<M, S2>where
S2: BuildHasher,
Set the hasher used for the map.
sourcepub fn with_capacity(self, capacity: usize) -> Options<M, S>
pub fn with_capacity(self, capacity: usize) -> Options<M, S>
Set the initial capacity for the map.
sourcepub fn construct<K, V>(
self
) -> (ReadHandle<K, V, M, S>, WriteHandle<K, V, M, S>)where
K: Eq + Hash + Clone,
S: BuildHasher + Clone,
V: Eq + ShallowCopy,
M: 'static + Clone,
pub fn construct<K, V>(
self
) -> (ReadHandle<K, V, M, S>, WriteHandle<K, V, M, S>)where
K: Eq + Hash + Clone,
S: BuildHasher + Clone,
V: Eq + ShallowCopy,
M: 'static + Clone,
Create the map, and construct the read and write handles used to access it.
Trait Implementations
Auto Trait Implementations
impl<M, S> RefUnwindSafe for Options<M, S>where
M: RefUnwindSafe,
S: RefUnwindSafe,
impl<M, S> Send for Options<M, S>where
M: Send,
S: Send,
impl<M, S> Sync for Options<M, S>where
M: Sync,
S: Sync,
impl<M, S> Unpin for Options<M, S>where
M: Unpin,
S: Unpin,
impl<M, S> UnwindSafe for Options<M, S>where
M: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more