head-management: add infrastructure
This commit is contained in:
parent
078c59d730
commit
8356dd5d5c
28 changed files with 1791 additions and 21 deletions
|
|
@ -66,6 +66,14 @@ impl<K: Eq + Hash, V> CopyHashMap<K, V> {
|
|||
unsafe { self.map.get().deref().contains_key(k) }
|
||||
}
|
||||
|
||||
pub fn not_contains<Q>(&self, k: &Q) -> bool
|
||||
where
|
||||
Q: Hash + Eq + ?Sized,
|
||||
K: Borrow<Q>,
|
||||
{
|
||||
!self.contains(k)
|
||||
}
|
||||
|
||||
pub fn lock(&self) -> Locked<'_, K, V> {
|
||||
Locked {
|
||||
source: self,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue