# List
`List`: a list that contains a single type of object.
Objects are borrowed, not owned.
This type is for internal-use only.
## Design
Each of the lists contains the following methods:
- `is_empty`
- `len`
- `front`
- `back`
- `contains`
- `push_front`
- `push_back`
- `insert`
- `iter`
- `iter_mut`
The also implement the `IntoIterator` trait, so they can be used with range-based-for-loops.
The regular `List` always returns a reference-to-object.
Whereas the `PairList` always returns a variant, where each of the branches of the variant is a reference-to-object.
## Implementation
This list is implemented as an intrusive doubly-linked list.
The links are tagged, so that a type can be a member of multiple lists (depending on the tag).
### Feature Implementation
This list implements an actual doubly-linked-list.
Elements must implement the `ListElement` interface, and provide access to a `ListEntry` implementation.
A `Tag` is used to distinguish between multiple implementations, so that an element can be present on multiple linked-lists.
## Tests
The tests are implemented in the `mod.rs`, and confirm the public interface of the selected list works as intended.
In the past, an alternative implementation (`vector_list::List`) existed, and this allowed sharing the tests between both implementations.