Module trait_based_collection::stack
source · [−]Expand description
A collection of different implementations of a stack based on the LIFO principle.
Currently, the following implementations are available:
Stack: A linked stack based on nodes.ArrayStack: A stack based on an array.
For more information, see the respective structs’ documentation.
For a pure FIFO or a mixed LIFO/FIFO data structure, see the queue module.
Structs
Iterator over the elements of a
ArrayStack. This struct is created by the into_iter method on ArrayStack. See its documentation for more.A stack is a collection that follows the LIFO (last-in-first-out) principle. This means that
elements are added to the top of the stack and removed from the top of the stack. This
implementation uses a linked-based structure.