pub struct RandomState { /* fields omitted */ }
RandomState is the default state for HashMap types.
A particular instance RandomState will create the same instances of Hasher, but the hashers created by two different RandomState instances are unlikely to produce the same result for the same values.
use std::collections::HashMap; use std::collections::hash_map::RandomState; let s = RandomState::new(); let mut map = HashMap::with_hasher(s); map.insert(1, 2);
impl RandomState[src]
pub fn new() -> RandomState[src]
Constructs a new RandomState that is initialized with random keys.
use std::collections::hash_map::RandomState; let s = RandomState::new();
impl BuildHasher for RandomState[src]
type Hasher = DefaultHasherType of the hasher that will be created.
fn build_hasher(&self) -> DefaultHasher[src]
impl Debug for RandomState[src]1.16.0
impl Clone for RandomState[src]
fn clone(&self) -> RandomState[src]
fn clone_from(&mut self, source: &Self)[src]1.0.0
Performs copy-assignment from source. Read more
impl Default for RandomState[src]
fn default() -> RandomState[src]
Constructs a new RandomState.
impl UnwindSafe for RandomStateimpl RefUnwindSafe for RandomStateimpl Unpin for RandomStateimpl Send for RandomStateimpl Sync for RandomStateimpl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
type Error = InfallibleThe type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
impl<T> From<T> for T[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
type Error = <U as TryFrom<T>>::ErrorThe type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
fn borrow(&self) -> &T[src]
impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized,
type Output = <F as Future>::Output;
impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized,
type Item = <I as Iterator>::Item;
impl<'_, R: Read + ?Sized> Read for &'_ mut R
impl<'_, W: Write + ?Sized> Write for &'_ mut W
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
fn borrow_mut(&mut self) -> &mut T[src]
impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized,
type Output = <F as Future>::Output;
impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized,
type Item = <I as Iterator>::Item;
impl<'_, R: Read + ?Sized> Read for &'_ mut R
impl<'_, W: Write + ?Sized> Write for &'_ mut W
impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> ToOwned for T where
T: Clone, [src]
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/collections/hash_map/struct.RandomState.html