A singly linked list written while going through the book Learn Rust With Entirely Too Many Linked Lists.
push
pop
- Mutable and immutable iteration
- Mutable and immutable retrieval of head and tail.
- Implementation of
FromIterator
for 32-bit integer types. So you can collect elements into another collection likeVec
or anotherSinglyLinkedList
usingcollect()
, or build aSinglyLinkedList
from an iterator (see the examples in the examples folder). This only works for 32-bit integer types.
For more details, clone the repo and run cargo doc --open
from the root of the project to generate the documentation.
You can run the associated unit tests with cargo test
and the examples using cargo run --example name_of_the_example
.