pub struct HasKey<K> { /* private fields */ }
Expand description
Matches if the map-like collection contains the given key.
The Matcher
tests for this by converting the map-like data structure
into a key/value pair iterator.
The alternative would be to use the Index trait though experiments showed
that this would not be composable with all_of!
or any_of!
.
Trait Implementations§
Auto Trait Implementations§
impl<K> Freeze for HasKey<K>where
K: Freeze,
impl<K> RefUnwindSafe for HasKey<K>where
K: RefUnwindSafe,
impl<K> Send for HasKey<K>where
K: Send,
impl<K> Sync for HasKey<K>where
K: Sync,
impl<K> Unpin for HasKey<K>where
K: Unpin,
impl<K> UnwindSafe for HasKey<K>where
K: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more