Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move multimap overview to its own file and extend it #37

Merged
merged 1 commit into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 2 additions & 97 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Built on top of the excellent [smallvec](https://github.com/servo/rust-smallvec)
| ⬜️⬜️⬜️⬜️⬜️ | EnumVecMultimap | `EnumMap<K, Vec<V>> ` |
| ⬜️⬜️⬜️⬜️⬜️ | EnumEnumMultimap | `EnumMap<K, EnumSet<V>>` |

[A detailed overview](doc/multimap.md).

## Multisets

| Completion | Name | Behaves as |
Expand All @@ -46,100 +48,3 @@ Built on top of the excellent [smallvec](https://github.com/servo/rust-smallvec)
| ⬜️⬜️⬜️⬜️⬜️ | EnumMultiset | `EnumMap<K,usize>` |

Some work is already done [in this PR](https://github.com/rinde/more_collections/pull/8).

## Multimaps overview

| Method | HashSetMultimap | HashVecMultimap | IndexSetMultimap | IndexVecMultimap |
| ------------------------------------- | --------------- | --------------- | ---------------- | ---------------- |
| new() | ✅ | ✅ | ✅ | ✅ |
| with_key_capacity() | ✅ | ✅ | ✅ | ✅ |
| with_hasher() | ✅ | ✅ | ✅ | ✅ |
| with_key_capacity_and_hasher() | ✅ | ✅ | ✅ | ✅ |
| key_capacity() | ✅ | ✅ | ✅ | ✅ |
| keys() | ✅ | ✅ | ✅ | ✅ |
| values() | ✅ | ✅ | ✅ | ✅ |
| values_mut() | maybe | maybe | maybe | maybe |
| iter() | ✅ | ✅ | ✅ | ✅ |
| len() | ✅ | ✅ | ✅ | ✅ |
| is_empty() | ✅ | ✅ | ✅ | ✅ |
| keys_len() | ✅ | ✅ | ✅ | ✅ |
| reserve() | ✅ | ✅ | ✅ | ✅ |
| shrink_keys_to_fit() | ✅ | ✅ | ✅ | ✅ |
| shrink_values_to_fit() | ✅ | ✅ | ✅ | ✅ |
| shrink_keys_to() | planned | planned | - | - |
| shrink_values_to() | planned | planned | - | planned |
| entry() | planned | planned | planned | planned |
| get() | ✅ | ✅ | ✅ | ✅ |
| get_key_values() | ✅ | ✅ | ✅ | ✅ |
| contains_key() | ✅ | ✅ | ✅ | ✅ |
| get_mut() | maybe | maybe | maybe | maybe |
| insert() | ✅ | ✅ | ✅ | ✅ |
| remove_key() | ✅ | ✅ | ✅ | ✅ |
| remove_key_entry() | ✅ | ✅ | ✅ | ✅ |
| retain() | ✅ | ✅ | ✅ | ✅ |
| into_keys() | ✅ | ✅ | ✅ | ✅ |
| into_values() | ✅ | ✅ | ✅ | ✅ |
| remove() | ✅ | ✅ | ✅ | ✅ |
| contains() | ✅ | ✅ | ✅ | ✅ |
| as_map() | ✅ | ✅ | ✅ | ✅ |
| into_map() | ✅ | ✅ | ✅ | ✅ |
| __IndexMap keys methods__ |
| insert_full() | - | - | ✅ | ✅ |
| get_full() | - | - | ✅ | ✅ |
| get_key_index() | - | - | ✅ | ✅ |
| get_full_mut() | - | - | maybe | maybe |
| swap_remove() | - | - | planned | planned |
| swap_remove_entry() | - | - | planned | planned |
| swap_remove_full() | - | - | planned | planned |
| shift_remove() | - | - | planned | planned |
| shift_remove_entry() | - | - | planned | planned |
| shift_remove_full() | - | - | planned | planned |
| pop() | - | - | planned | planned |
| sort_keys() | - | - | planned | planned |
| sort_by() | - | - | planned | planned |
| sorted_by() | - | - | planned | planned |
| reverse() | - | - | planned | planned |
| get_index() | - | - | planned | planned |
| get_index_mut() | - | - | maybe | maybe |
| first() | - | - | planned | planned |
| first_mut() | - | - | maybe | maybe |
| last() | - | - | planned | planned |
| last_mut() | - | - | maybe | maybe |
| swap_remove_index() | - | - | planned | planned |
| shift_remove_index() | - | - | planned | planned |
| swap_indices() | - | - | planned | planned |
| __Set values methods__ |
| difference() | planned | - | planned | - |
| symmetric_difference() | planned | - | planned | - |
| intersection() | planned | - | planned | - |
| union() | planned | - | planned | - |
| is_disjoint() | planned | - | planned | - |
| is_subset() | planned | - | planned | - |
| is_superset() | planned | - | planned | - |
| __Consistent ordered values methods__ |
| sort_values() | - | planned | planned | planned |
| sort_values_by() | - | planned | planned | planned |
| TODO consider adding more mutators |
| __Traits__ |
| Extend | ✅ | ✅ | ✅ | ✅ |
| FromIterator | ✅ | ✅ | ✅ | ✅ |
| From wrapped type | ✅ | ✅ | ✅ | ✅ |
| IntoIterator | ✅ | ✅ | ✅ | ✅ |
| Default | ✅ | ✅ | ✅ | ✅ |
| Index | ✅ | ✅ | ✅ | ✅ |
| Eq | ✅ | ✅ | ✅ | ✅ |
| PartialEq | ✅ | ✅ | ✅ | ✅ |
| Debug | ✅ | ✅ | ✅ | ✅ |
| Clone | ✅ | ✅ | ✅ | ✅ |
| Serializable | planned | planned | planned | planned |
| Deserializable | planned | planned | planned | planned |


# Todo

- [ ] Add benches
- [ ] Look into `no_std` compatibility
- [ ] Look into `WASM` compatibility
- [ ] Look into no-unsafe clippy rule
- [ ] Add features to disable parts of the crate (e.g. dependencies should be optional)
- [ ] Implement custom iterators following this advice: https://stackoverflow.com/questions/52079983/what-is-the-advantage-of-publishing-a-concrete-type-in-a-crates-api-instead-of
Loading
Loading