Trait HashMapMatchers

Source
pub trait HashMapMatchers<K, V> {
    // Required methods
    fn to_be_empty(self) -> Self;
    fn to_have_length(self, expected: usize) -> Self;
    fn to_contain_key<Q>(self, key: &Q) -> Self
       where K: Borrow<Q>,
             Q: Hash + Eq + Debug + ?Sized;
    fn to_contain_entry<Q, R>(self, key: &Q, value: &R) -> Self
       where K: Borrow<Q>,
             V: Borrow<R>,
             Q: Hash + Eq + Debug + ?Sized,
             R: PartialEq + Debug + ?Sized;
}

Required Methods§

Source

fn to_be_empty(self) -> Self

Source

fn to_have_length(self, expected: usize) -> Self

Source

fn to_contain_key<Q>(self, key: &Q) -> Self
where K: Borrow<Q>, Q: Hash + Eq + Debug + ?Sized,

Source

fn to_contain_entry<Q, R>(self, key: &Q, value: &R) -> Self
where K: Borrow<Q>, V: Borrow<R>, Q: Hash + Eq + Debug + ?Sized, R: PartialEq + Debug + ?Sized,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<M, K, V> HashMapMatchers<K, V> for Assertion<M>
where K: Hash + Eq + Debug + Clone, V: Debug + Clone, M: AsHashMap<K, V> + Debug + Clone,