| 1 | use craterust-analyzer cargo cc-traits 2.0.0 crate/::{ |
| 2 | Capacityrust-analyzer cargo cc-traits 2.0.0 Capacity#, 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#, GetMutrust-analyzer cargo cc-traits 2.0.0 GetMut#, Insertrust-analyzer cargo cc-traits 2.0.0 Insert#, Lenrust-analyzer cargo cc-traits 2.0.0 Len#, Removerust-analyzer cargo cc-traits 2.0.0 Remove#, |
| 3 | Reserverust-analyzer cargo cc-traits 2.0.0 Reserve#, SimpleCollectionMutrust-analyzer cargo cc-traits 2.0.0 SimpleCollectionMut#, SimpleCollectionRefrust-analyzer cargo cc-traits 2.0.0 SimpleCollectionRef#, WithCapacityrust-analyzer cargo cc-traits 2.0.0 WithCapacity#, |
| 4 | }; |
| 5 | use slabrust-analyzer cargo slab 0.4.2 crate/::Slabrust-analyzer cargo slab 0.4.2 Slab#; |
| 6 | |
| 7 | impl<T> Collectionrust-analyzer cargo cc-traits 2.0.0 Collection# for Slabrust-analyzer cargo slab 0.4.2 Slab#<T> { |
| 8 | type Itemrust-analyzer cargo cc-traits 2.0.0 impls/slab/impl#[`Slab<T>`][Collection]Item# = T; |
| 9 | } |
| 10 | |
| 11 | impl<T> CollectionRefrust-analyzer cargo cc-traits 2.0.0 CollectionRef# for Slabrust-analyzer cargo slab 0.4.2 Slab#<T> { |
| 12 | type ItemRefrust-analyzer cargo cc-traits 2.0.0 impls/slab/impl#[`Slab<T>`][CollectionRef]ItemRef#<'a> = &'a T where Selfrust-analyzer cargo cc-traits 2.0.0 impls/slab/impl#[`Slab<T>`][CollectionRef]: 'a; |
| 13 | |
| 14 | craterust-analyzer cargo cc-traits 2.0.0 crate/::covariant_item_refrust-analyzer cargo cc-traits 2.0.0 macros/covariant_item_ref!!(); |
| 15 | } |
| 16 | |
| 17 | impl<T> CollectionMutrust-analyzer cargo cc-traits 2.0.0 CollectionMut# for Slabrust-analyzer cargo slab 0.4.2 Slab#<T> { |
| 18 | type ItemMutrust-analyzer cargo cc-traits 2.0.0 impls/slab/impl#[`Slab<T>`][CollectionMut]ItemMut#<'a> = &'a mut T where Selfrust-analyzer cargo cc-traits 2.0.0 impls/slab/impl#[`Slab<T>`][CollectionMut]: 'a; |
| 19 | |
| 20 | craterust-analyzer cargo cc-traits 2.0.0 crate/::covariant_item_mutrust-analyzer cargo cc-traits 2.0.0 macros/covariant_item_mut!!(); |
| 21 | } |
| 22 | |
| 23 | impl<T> SimpleCollectionRefrust-analyzer cargo cc-traits 2.0.0 SimpleCollectionRef# for Slabrust-analyzer cargo slab 0.4.2 Slab#<T> { |
| 24 | craterust-analyzer cargo cc-traits 2.0.0 crate/::simple_collection_refrust-analyzer cargo cc-traits 2.0.0 macros/simple_collection_ref!!(); |
| 25 | } |
| 26 | |
| 27 | impl<T> SimpleCollectionMutrust-analyzer cargo cc-traits 2.0.0 SimpleCollectionMut# for Slabrust-analyzer cargo slab 0.4.2 Slab#<T> { |
| 28 | craterust-analyzer cargo cc-traits 2.0.0 crate/::simple_collection_mutrust-analyzer cargo cc-traits 2.0.0 macros/simple_collection_mut!!(); |
| 29 | } |
| 30 | |
| 31 | impl<T> WithCapacityrust-analyzer cargo cc-traits 2.0.0 WithCapacity# for Slabrust-analyzer cargo slab 0.4.2 Slab#<T> { |
| 32 | fn with_capacityrust-analyzer cargo cc-traits 2.0.0 impls/slab/impl#[`Slab<T>`][WithCapacity]with_capacity().(capacity: usize) -> Selfrust-analyzer cargo cc-traits 2.0.0 impls/slab/impl#[`Slab<T>`][WithCapacity] { |
| 33 | Slabrust-analyzer cargo slab 0.4.2 Slab#::with_capacityrust-analyzer cargo slab 0.4.2 impl#[`Slab<T>`]with_capacity().(capacity) |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | impl<T> Lenrust-analyzer cargo cc-traits 2.0.0 Len# for Slabrust-analyzer cargo slab 0.4.2 Slab#<T> { |
| 38 | fn lenrust-analyzer cargo cc-traits 2.0.0 impls/slab/impl#[`Slab<T>`][Len]len().(&self) -> usize { |
| 39 | self.lenrust-analyzer cargo slab 0.4.2 impl#[`Slab<T>`]len().() |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | impl<T> Capacityrust-analyzer cargo cc-traits 2.0.0 Capacity# for Slabrust-analyzer cargo slab 0.4.2 Slab#<T> { |
| 44 | fn capacityrust-analyzer cargo cc-traits 2.0.0 impls/slab/impl#[`Slab<T>`][Capacity]capacity().(&self) -> usize { |
| 45 | self.capacityrust-analyzer cargo slab 0.4.2 impl#[`Slab<T>`]capacity().() |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | impl<T> Reserverust-analyzer cargo cc-traits 2.0.0 Reserve# for Slabrust-analyzer cargo slab 0.4.2 Slab#<T> { |
| 50 | fn reserverust-analyzer cargo cc-traits 2.0.0 impls/slab/impl#[`Slab<T>`][Reserve]reserve().(&mut self, additional: usize) { |
| 51 | self.reserverust-analyzer cargo slab 0.4.2 impl#[`Slab<T>`]reserve().(additional) |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | impl<T> Getrust-analyzer cargo cc-traits 2.0.0 Get#<usize> for Slabrust-analyzer cargo slab 0.4.2 Slab#<T> { |
| 56 | fn getrust-analyzer cargo cc-traits 2.0.0 impls/slab/impl#[`Slab<T>`][`Get<usize>`]get().(&self, key: usize) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&Selfrust-analyzer cargo cc-traits 2.0.0 impls/slab/impl#[`Slab<T>`][`Get<usize>`]::Itemrust-analyzer cargo cc-traits 2.0.0 Collection#Item#> { |
| 57 | self.getrust-analyzer cargo slab 0.4.2 impl#[`Slab<T>`]get().(key) |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | impl<T> GetMutrust-analyzer cargo cc-traits 2.0.0 GetMut#<usize> for Slabrust-analyzer cargo slab 0.4.2 Slab#<T> { |
| 62 | fn get_mutrust-analyzer cargo cc-traits 2.0.0 impls/slab/impl#[`Slab<T>`][`GetMut<usize>`]get_mut().(&mut self, key: usize) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&mut Selfrust-analyzer cargo cc-traits 2.0.0 impls/slab/impl#[`Slab<T>`][`GetMut<usize>`]::Itemrust-analyzer cargo cc-traits 2.0.0 Collection#Item#> { |
| 63 | self.get_mutrust-analyzer cargo slab 0.4.2 impl#[`Slab<T>`]get_mut().(key) |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | impl<T> Insertrust-analyzer cargo cc-traits 2.0.0 Insert# for Slabrust-analyzer cargo slab 0.4.2 Slab#<T> { |
| 68 | type Outputrust-analyzer cargo cc-traits 2.0.0 impls/slab/impl#[`Slab<T>`][Insert]Output# = usize; |
| 69 | |
| 70 | fn insertrust-analyzer cargo cc-traits 2.0.0 impls/slab/impl#[`Slab<T>`][Insert]insert().(&mut self, element: T) -> usize { |
| 71 | self.insertrust-analyzer cargo slab 0.4.2 impl#[`Slab<T>`]insert().(element) |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | impl<T> Removerust-analyzer cargo cc-traits 2.0.0 Remove#<usize> for Slabrust-analyzer cargo slab 0.4.2 Slab#<T> { |
| 76 | fn removerust-analyzer cargo cc-traits 2.0.0 impls/slab/impl#[`Slab<T>`][`Remove<usize>`]remove().(&mut self, key: usize) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<T> { |
| 77 | if self.containsrust-analyzer cargo slab 0.4.2 impl#[`Slab<T>`]contains().(key) { |
| 78 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(self.removerust-analyzer cargo slab 0.4.2 impl#[`Slab<T>`]remove().(key)) |
| 79 | } else { |
| 80 | Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None# |
| 81 | } |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | impl<T> Clearrust-analyzer cargo cc-traits 2.0.0 Clear# for Slabrust-analyzer cargo slab 0.4.2 Slab#<T> { |
| 86 | fn clearrust-analyzer cargo cc-traits 2.0.0 impls/slab/impl#[`Slab<T>`][Clear]clear().(&mut self) { |
| 87 | self.clearrust-analyzer cargo slab 0.4.2 impl#[`Slab<T>`]clear().() |
| 88 | } |
| 89 | } |