[−][src]Struct evmap::Options
Options for how to initialize the map.
In particular, the options dictate the hashing function, meta type, and initial capacity of the map.
Implementations
impl<M, S> Options<M, S> where
S: BuildHasher,
[src]
S: BuildHasher,
pub fn with_meta<M2>(self, meta: M2) -> Options<M2, S>
[src]
Set the initial meta value for the map.
pub unsafe fn with_hasher<S2>(self, hash_builder: S2) -> Options<M, S2> where
S2: BuildHasher,
[src]
S2: BuildHasher,
Set the hasher used for the map.
Safety
This method is safe to call as long as the given hasher is deterministic. That is, it must yield the same hash if given the same sequence of inputs.
pub fn with_capacity(self, capacity: usize) -> Options<M, S>
[src]
Set the initial capacity for the map.
pub fn construct<K, V>(
self
) -> (WriteHandle<K, V, M, S>, ReadHandle<K, V, M, S>) where
K: StableHashEq + Eq + Hash + Clone,
S: BuildHasher + Clone,
V: StableHashEq + Eq + Hash,
M: 'static + Clone,
[src]
self
) -> (WriteHandle<K, V, M, S>, ReadHandle<K, V, M, S>) where
K: StableHashEq + Eq + Hash + Clone,
S: BuildHasher + Clone,
V: StableHashEq + Eq + Hash,
M: 'static + Clone,
Create the map, and construct the read and write handles used to access it.
If you want to use arbitrary types for the keys and values, use [assert_stable
].
pub unsafe fn assert_stable<K, V>(
self
) -> (WriteHandle<K, V, M, S>, ReadHandle<K, V, M, S>) where
K: Eq + Hash + Clone,
S: BuildHasher + Clone,
V: Eq + Hash,
M: 'static + Clone,
[src]
self
) -> (WriteHandle<K, V, M, S>, ReadHandle<K, V, M, S>) where
K: Eq + Hash + Clone,
S: BuildHasher + Clone,
V: Eq + Hash,
M: 'static + Clone,
Create the map, and construct the read and write handles used to access it.
Safety
This method is safe to call as long as the implementation of Hash
and Eq
for both K
and V
are deterministic. That is, they must always yield the same result if given the
same inputs.
Trait Implementations
impl<M, S> Debug for Options<M, S> where
S: BuildHasher,
M: Debug,
[src]
S: BuildHasher,
M: Debug,
impl Default for Options<(), RandomState>
[src]
Auto Trait Implementations
impl<M, S> RefUnwindSafe for Options<M, S> where
M: RefUnwindSafe,
S: RefUnwindSafe,
[src]
M: RefUnwindSafe,
S: RefUnwindSafe,
impl<M, S> Send for Options<M, S> where
M: Send,
S: Send,
[src]
M: Send,
S: Send,
impl<M, S> Sync for Options<M, S> where
M: Sync,
S: Sync,
[src]
M: Sync,
S: Sync,
impl<M, S> Unpin for Options<M, S> where
M: Unpin,
S: Unpin,
[src]
M: Unpin,
S: Unpin,
impl<M, S> UnwindSafe for Options<M, S> where
M: UnwindSafe,
S: UnwindSafe,
[src]
M: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,