associative_positional_list 0.1.3

AssociativePositionalList is a list-like container in which each value is associated with an index, but unlike other list containers, the index for a value can be determined efficiently.
Documentation
  • Coverage
  • 91.67%
    11 out of 12 items documented1 out of 11 items with examples
  • Size
  • Source code size: 51.16 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.14 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • jwhitham

AssociativePositionalList (Rust crate)

AssociativePositionalList is a positional container in which each value is associated with an index, starting at 0 for the first element. Values can be inserted and removed at any index (with logarithmic time complexity). The value at any index can be accessed with get. But unlike other list containers such as Vec, the association between index and value is reversible, and the index for a value may be determined using find.

Notes

Items in AssociativePositionalList must be unique so that find is unambiguous. They must also be Cloneable and Hashable.

This crate was developed by a relative newcomer to Rust as part of a learning exercise. It may not be very efficient. Some of the interfaces you may expect as part of a list container (or a set) are not present.

Aside from the tests within the crate source code, a complete usage example can be found here.