rok::core::collections
rok::core::collections - List / Dict / Set / OrderedDict / OrderedSet / Slice (stdlib spec 2.9), Deque and BinaryHeap.
Each collection is a small handle struct over GC buffers (raw):
copying the handle shares the collection, so the mutating methods
take self (spec writes ref self; the handle makes that moot).
Modules
rawrok::core::collections::raw - the GC buffer the collections are built on (stdlib 2.9.12).listrok::core::collections::list - `List<T>`, a growable array (stdlib spec 2.9.2): one object holding the length, the capacity and the current element buffer, swapped for a bigger one on growth.dequerok::core::collections::deque - `Deque<T>`, a growable ring buffer with O(1) push and pop at both ends.heaprok::core::collections::heap - `BinaryHeap<T>`, a priority queue over a `List` laid out as an implicit binary tree.dictrok::core::collections::dict - `Dict<K, V>`, a hash map (stdlib spec 2.9.3), compact: entries are appended to dense key / value / hash arrays, and a power-of-two index of linear-probed slots maps a hash to its entry.setrok::core::collections::set - `Set<T>`, a hash set (stdlib spec 2.9.4) over `Dict<T, bool>`.ordered_dictrok::core::collections::ordered_dict - `OrderedDict<K, V>`, a hash map that iterates in insertion order (stdlib spec 2.9.5): a `Dict`, whose compact entries already keep that order.ordered_setrok::core::collections::ordered_set - `OrderedSet<T>`, a hash set that iterates in insertion order (stdlib spec 2.9.5), over `OrderedDict<T, bool>`.slicerok::core::collections::slice: `Slice<T>`, a zero-copy view (stdlib 2.9.7); element `i` is `buf[start + i * stride]`, and the view keeps its buffer alive.broadcastrok::core::collections::broadcast - the element-wise dot operators on `List<T>` (stdlib spec 2.6.7): `List op List` (same length, else a panic), `List op T` and `T op List` (the scalar applies to every element).
Re-exports
list::
pub use list::deque::
pub use deque::heap::BinaryHeap
pub use heap::BinaryHeapdict::
pub use dict::set::Set
pub use set::Setordered_dict::OrderedDict
pub use ordered_dict::OrderedDictordered_set::OrderedSet
pub use ordered_set::OrderedSetslice::
pub use slice::