Struct RandomState
struct RandomState { ... }
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.
Examples
use HashMap;
use RandomState;
let s = new;
let mut map = with_hasher;
map.insert;
Implementations
impl RandomState
fn new() -> RandomStateConstructs a new
RandomStatethat is initialized with random keys.Examples
use RandomState; let s = new;
impl BuildHasher for RandomState
fn build_hasher(self: &Self) -> DefaultHasher
impl Clone for RandomState
fn clone(self: &Self) -> RandomState
impl Debug for RandomState
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Default for RandomState
fn default() -> RandomStateConstructs a new
RandomState.
impl Freeze for RandomState
impl RefUnwindSafe for RandomState
impl Send for RandomState
impl Sync for RandomState
impl Unpin for RandomState
impl UnsafeUnpin for RandomState
impl UnwindSafe for RandomState
impl<T> Any for RandomState
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for RandomState
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for RandomState
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for RandomState
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for RandomState
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for RandomState
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for RandomState
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for RandomState
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for RandomState
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>