A collection of data structures that implement the [Collection] trait, allowing for a common
interface for all the data structures in this crate. This crate is intended to be a proof of
concept a common interface for all the data structures in Rust. Not all the data structures
are implemented in this crate, but the ones that are implemented are:
- [
Queue]: AFIFOdata structure based on linked nodes. - [
Deque]: AFIFOandLIFOdata structure based on linked nodes. - [
CircularDeque]: AFIFOandLIFOdata structure based on a circular array. - [
Stack]: ALIFOdata structure based on a linked nodes. - [
ArrayStack]: ALIFOdata structure based on a fixed size array. - [
BinaryHeap]: APriorityQueuedata structure based on a binary heap.
The crate also contains the following traits:
- [
Collection]: A trait that defines the common interface for all the data structures in this crate. - [
FixedSizeCollection]: A trait that defines the common interface for all the data structures in this crate that have a fixed size. - [
Iterators]: A trait that defines the common interface for all the iterators in this crate. - [
DequeCollection]: A trait that defines the common interface for all the data structures in this crate that are bothFIFOandLIFO.
The crate also contains the following macros for easily creating data structures:
- [
queue!]: A macro that creates a [Queue] data structure. - [
deque!]: A macro that creates a [Deque] data structure. - [
circular_deque!]: A macro that creates a [CircularDeque] data structure. - [
stack!]: A macro that creates a [Stack] data structure. - [
array_stack!]: A macro that creates a [ArrayStack] data structure. - [
binary_heap!]: A macro that creates a [BinaryHeap] data structure.
The crate also contain extra modules for creating new data structures and for creating macros
that can be used to add functionality to the data structures in this crate. For more information
about these modules, see the documentation of [macros].
Example
use ;
import!;
#