Struct HashMapStrategy

#[must_use = "strategies do nothing unless used"]
pub struct HashMapStrategy<K, V>(/* private field */)
where
    K: Strategy,
    V: Strategy,
    K::Value: Hash + Eq,;

Strategy to create HashMaps with a length in a certain range.

Created by the hash_map() function in the same module.

Trait Implementations

impl<K, V> Clone for HashMapStrategy<K, V> where K: Strategy + Clone, V: Strategy + Clone, K::Value: Hash + Eq,

fn clone(&self) -> HashMapStrategy<K, V>

impl<K, V> Debug for HashMapStrategy<K, V> where K: Strategy + Debug, V: Strategy + Debug, K::Value: Hash + Eq,

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl<K, V> Strategy for HashMapStrategy<K, V> where K: Strategy, V: Strategy, K::Value: Hash + Eq,

type Tree = HashMapValueTree<<K as Strategy>::Tree, <V as Strategy>::Tree>;
type Value = HashMap<<K as Strategy>::Value, <V as Strategy>::Value>;
fn new_tree(&self, runner: &mut TestRunner) -> NewTree<Self>

Auto Trait Implementations

impl<K, V> Freeze for HashMapStrategy<K, V> where Filter<Map<VecStrategy<(K, V)>, VecToHashMap>, MinSize>: Freeze,

impl<K, V> RefUnwindSafe for HashMapStrategy<K, V> where Filter<Map<VecStrategy<(K, V)>, VecToHashMap>, MinSize>: RefUnwindSafe,

impl<K, V> Send for HashMapStrategy<K, V> where Filter<Map<VecStrategy<(K, V)>, VecToHashMap>, MinSize>: Send,

impl<K, V> Sync for HashMapStrategy<K, V> where Filter<Map<VecStrategy<(K, V)>, VecToHashMap>, MinSize>: Sync,

impl<K, V> Unpin for HashMapStrategy<K, V> where Filter<Map<VecStrategy<(K, V)>, VecToHashMap>, MinSize>: Unpin,

impl<K, V> UnsafeUnpin for HashMapStrategy<K, V> where Filter<Map<VecStrategy<(K, V)>, VecToHashMap>, MinSize>: UnsafeUnpin,

impl<K, V> UnwindSafe for HashMapStrategy<K, V> where Filter<Map<VecStrategy<(K, V)>, VecToHashMap>, MinSize>: UnwindSafe,

Blanket Implementations

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for HashMapStrategy<K, V> where ST: ?Sized, DT: ?Sized,

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for HashMapStrategy<K, V> where ST: ?Sized, DT: ?Sized,

impl<T> Any for HashMapStrategy<K, V> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for HashMapStrategy<K, V> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for HashMapStrategy<K, V> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for HashMapStrategy<K, V> where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for HashMapStrategy<K, V>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Read<Exclusive, BecauseExclusive> for HashMapStrategy<K, V> where T: ?Sized,

impl<T> ToOwned for HashMapStrategy<K, V> where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for HashMapStrategy<K, V> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for HashMapStrategy<K, V> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for HashMapStrategy<K, V> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

impl<V, T> VZip<V> for HashMapStrategy<K, V> where V: MultiLane<T>,

fn vzip(self) -> V