Module cyclic_data_types::list
source · Expand description
The list module contains a series of structs to create cyclic lists and their utility functionalities.
Cyclic List Example
1 ↔ 2 ↔ ... ↔ n
↑ ↑
└─────────────┘
Note: Even though the diagram uses arrow to denote the relationship between nodes/elements; implying a linked node structure - however, the implementation in this crate uses arrays.
As result, a List<T>
struct can be sized (assuming that T
is also sized). Allowing the List
to exist on the stack.
Structs
List
is the struct
used to define the state of a cyclic List