| 1 | use craterust-analyzer cargo cc-traits 2.0.0 crate/::{ |
| 2 | Clearrust-analyzer cargo cc-traits 2.0.0 Clear#, Collectionrust-analyzer cargo cc-traits 2.0.0 Collection#, CollectionMutrust-analyzer cargo cc-traits 2.0.0 CollectionMut#, CollectionRefrust-analyzer cargo cc-traits 2.0.0 CollectionRef#, Getrust-analyzer cargo cc-traits 2.0.0 Get#, GetKeyValuerust-analyzer cargo cc-traits 2.0.0 GetKeyValue#, GetMutrust-analyzer cargo cc-traits 2.0.0 GetMut#, Iterrust-analyzer cargo cc-traits 2.0.0 Iter#, Keyedrust-analyzer cargo cc-traits 2.0.0 Keyed#, |
| 3 | KeyedRefrust-analyzer cargo cc-traits 2.0.0 KeyedRef#, Lenrust-analyzer cargo cc-traits 2.0.0 Len#, MapInsertrust-analyzer cargo cc-traits 2.0.0 MapInsert#, MapIterrust-analyzer cargo cc-traits 2.0.0 MapIter#, MapIterMutrust-analyzer cargo cc-traits 2.0.0 MapIterMut#, Removerust-analyzer cargo cc-traits 2.0.0 Remove#, SimpleCollectionMutrust-analyzer cargo cc-traits 2.0.0 SimpleCollectionMut#, |
| 4 | SimpleCollectionRefrust-analyzer cargo cc-traits 2.0.0 SimpleCollectionRef#, SimpleKeyedRefrust-analyzer cargo cc-traits 2.0.0 SimpleKeyedRef#, |
| 5 | }; |
| 6 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::{borrowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/::Borrowrust-analyzer cargo core https://github.com/rust-lang/rust/library/core borrow/Borrow#, collectionsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/::HashMaprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/HashMap#, hashrust-analyzer cargo std https://github.com/rust-lang/rust/library/std hash/::Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash#}; |
| 7 | |
| 8 | impl<K, V> Collectionrust-analyzer cargo cc-traits 2.0.0 Collection# for HashMaprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/HashMap#<K, V> { |
| 9 | type Itemrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][Collection]Item# = V; |
| 10 | } |
| 11 | |
| 12 | impl<K, V> CollectionRefrust-analyzer cargo cc-traits 2.0.0 CollectionRef# for HashMaprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/HashMap#<K, V> { |
| 13 | type ItemRefrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][CollectionRef]ItemRef#<'a> = &'a V where Selfrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][CollectionRef]: 'a; |
| 14 | |
| 15 | craterust-analyzer cargo cc-traits 2.0.0 crate/::covariant_item_refrust-analyzer cargo cc-traits 2.0.0 macros/covariant_item_ref!!(); |
| 16 | } |
| 17 | |
| 18 | impl<K, V> CollectionMutrust-analyzer cargo cc-traits 2.0.0 CollectionMut# for HashMaprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/HashMap#<K, V> { |
| 19 | type ItemMutrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][CollectionMut]ItemMut#<'a> = &'a mut V where Selfrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][CollectionMut]: 'a; |
| 20 | |
| 21 | craterust-analyzer cargo cc-traits 2.0.0 crate/::covariant_item_mutrust-analyzer cargo cc-traits 2.0.0 macros/covariant_item_mut!!(); |
| 22 | } |
| 23 | |
| 24 | impl<K, V> SimpleCollectionRefrust-analyzer cargo cc-traits 2.0.0 SimpleCollectionRef# for HashMaprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/HashMap#<K, V> { |
| 25 | craterust-analyzer cargo cc-traits 2.0.0 crate/::simple_collection_refrust-analyzer cargo cc-traits 2.0.0 macros/simple_collection_ref!!(); |
| 26 | } |
| 27 | |
| 28 | impl<K, V> SimpleCollectionMutrust-analyzer cargo cc-traits 2.0.0 SimpleCollectionMut# for HashMaprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/HashMap#<K, V> { |
| 29 | craterust-analyzer cargo cc-traits 2.0.0 crate/::simple_collection_mutrust-analyzer cargo cc-traits 2.0.0 macros/simple_collection_mut!!(); |
| 30 | } |
| 31 | |
| 32 | impl<K, V> Keyedrust-analyzer cargo cc-traits 2.0.0 Keyed# for HashMaprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/HashMap#<K, V> { |
| 33 | type Keyrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][Keyed]Key# = K; |
| 34 | } |
| 35 | |
| 36 | impl<K, V> KeyedRefrust-analyzer cargo cc-traits 2.0.0 KeyedRef# for HashMaprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/HashMap#<K, V> { |
| 37 | type KeyRefrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][KeyedRef]KeyRef#<'a> = &'a K where Selfrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][KeyedRef]: 'a; |
| 38 | |
| 39 | craterust-analyzer cargo cc-traits 2.0.0 crate/::covariant_key_refrust-analyzer cargo cc-traits 2.0.0 macros/covariant_key_ref!!(); |
| 40 | } |
| 41 | |
| 42 | impl<K, V> SimpleKeyedRefrust-analyzer cargo cc-traits 2.0.0 SimpleKeyedRef# for HashMaprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/HashMap#<K, V> { |
| 43 | craterust-analyzer cargo cc-traits 2.0.0 crate/::simple_keyed_refrust-analyzer cargo cc-traits 2.0.0 macros/simple_keyed_ref!!(); |
| 44 | } |
| 45 | |
| 46 | impl<K, V> Lenrust-analyzer cargo cc-traits 2.0.0 Len# for HashMaprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/HashMap#<K, V> { |
| 47 | #[inline(always)] |
| 48 | fn lenrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][Len]len().(&self) -> usize { |
| 49 | self.lenrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]len().() |
| 50 | } |
| 51 | |
| 52 | #[inline(always)] |
| 53 | fn is_emptyrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][Len]is_empty().(&self) -> bool { |
| 54 | self.is_emptyrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]is_empty().() |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | impl<'a, Q, K: Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash# + Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq#, V> Getrust-analyzer cargo cc-traits 2.0.0 Get#<&'a Q> for HashMaprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/HashMap#<K, V> |
| 59 | where |
| 60 | K: Borrowrust-analyzer cargo core https://github.com/rust-lang/rust/library/core borrow/Borrow#<Q>, |
| 61 | Q: Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash# + Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq# + ?Sizedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sized#, |
| 62 | { |
| 63 | #[inline(always)] |
| 64 | fn getrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][`Get<&'a Q>`]get().(&self, key: &'a Q) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&V> { |
| 65 | self.getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(key) |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | impl<'a, Q, K: Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash# + Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq#, V> GetMutrust-analyzer cargo cc-traits 2.0.0 GetMut#<&'a Q> for HashMaprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/HashMap#<K, V> |
| 70 | where |
| 71 | K: Borrowrust-analyzer cargo core https://github.com/rust-lang/rust/library/core borrow/Borrow#<Q>, |
| 72 | Q: Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash# + Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq# + ?Sizedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sized#, |
| 73 | { |
| 74 | #[inline(always)] |
| 75 | fn get_mutrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][`GetMut<&'a Q>`]get_mut().(&mut self, key: &'a Q) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&mut V> { |
| 76 | self.get_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get_mut().(key) |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | impl<'a, Q, K: Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash# + Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq#, V> GetKeyValuerust-analyzer cargo cc-traits 2.0.0 GetKeyValue#<&'a Q> for HashMaprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/HashMap#<K, V> |
| 81 | where |
| 82 | K: Borrowrust-analyzer cargo core https://github.com/rust-lang/rust/library/core borrow/Borrow#<Q>, |
| 83 | Q: Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash# + Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq# + ?Sizedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sized#, |
| 84 | { |
| 85 | #[inline(always)] |
| 86 | fn get_key_valuerust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][`GetKeyValue<&'a Q>`]get_key_value().(&self, key: &'a Q) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<(&K, &V)> { |
| 87 | self.get_key_valuerust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get_key_value().(key) |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | impl<K: Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash# + Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq#, V> MapInsertrust-analyzer cargo cc-traits 2.0.0 MapInsert#<K> for HashMaprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/HashMap#<K, V> { |
| 92 | type Outputrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][`MapInsert<K>`]Output# = Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<V>; |
| 93 | |
| 94 | #[inline(always)] |
| 95 | fn insertrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][`MapInsert<K>`]insert().(&mut self, key: K, value: V) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<V> { |
| 96 | self.insertrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]insert().(key, value) |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | impl<'a, Q, K: Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash# + Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq#, V> Removerust-analyzer cargo cc-traits 2.0.0 Remove#<&'a Q> for HashMaprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/HashMap#<K, V> |
| 101 | where |
| 102 | K: Borrowrust-analyzer cargo core https://github.com/rust-lang/rust/library/core borrow/Borrow#<Q>, |
| 103 | Q: Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash# + Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq# + ?Sizedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Sized#, |
| 104 | { |
| 105 | #[inline(always)] |
| 106 | fn removerust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][`Remove<&'a Q>`]remove().(&mut self, key: &'a Q) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<V> { |
| 107 | self.removerust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]remove().(key) |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | impl<K, V> Clearrust-analyzer cargo cc-traits 2.0.0 Clear# for HashMaprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/HashMap#<K, V> { |
| 112 | #[inline(always)] |
| 113 | fn clearrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][Clear]clear().(&mut self) { |
| 114 | self.clearrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]clear().() |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | impl<K, V> Iterrust-analyzer cargo cc-traits 2.0.0 Iter# for HashMaprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/HashMap#<K, V> { |
| 119 | type Iterrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][Iter]Iter#<'a> = stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::collectionsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/::hash_maprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash_map/::Valuesrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/Values#<'a, K, V> where Selfrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][Iter]: 'a; |
| 120 | |
| 121 | #[inline(always)] |
| 122 | fn iterrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][Iter]iter().(&self) -> Selfrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][Iter]::Iterrust-analyzer cargo cc-traits 2.0.0 Iter#Iter#<'_> { |
| 123 | self.valuesrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]values().() |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | impl<K, V> MapIterrust-analyzer cargo cc-traits 2.0.0 MapIter# for HashMaprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/HashMap#<K, V> { |
| 128 | type Iterrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][MapIter]Iter#<'a> = stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::collectionsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/::hash_maprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash_map/::Iterrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/Iter#<'a, K, V> where Selfrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][MapIter]: 'a; |
| 129 | |
| 130 | #[inline(always)] |
| 131 | fn iterrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][MapIter]iter().(&self) -> Selfrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][MapIter]::Iterrust-analyzer cargo cc-traits 2.0.0 MapIter#Iter#<'_> { |
| 132 | self.iterrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]iter().() |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | impl<K, V> MapIterMutrust-analyzer cargo cc-traits 2.0.0 MapIterMut# for HashMaprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/HashMap#<K, V> { |
| 137 | type IterMutrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][MapIterMut]IterMut#<'a> = stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::collectionsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/::hash_maprust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash_map/::IterMutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/IterMut#<'a, K, V> where Selfrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][MapIterMut]: 'a; |
| 138 | |
| 139 | #[inline(always)] |
| 140 | fn iter_mutrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][MapIterMut]iter_mut().(&mut self) -> Selfrust-analyzer cargo cc-traits 2.0.0 impls/std/hashmap/impl#[`HashMap<K, V>`][MapIterMut]::IterMutrust-analyzer cargo cc-traits 2.0.0 MapIterMut#IterMut#<'_> { |
| 141 | self.iter_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]iter_mut().() |
| 142 | } |
| 143 | } |