cursed_collections/
lib.rs

1//! Collections that (seem) to break Rust safety.
2//!
3//! Mutating a `Vec` as we still hold references to it's element is forbidden by the borrow checker.
4//! The reason is that the vector could grow and move its elements to a new buffer. Our poor
5//! references would point then  point to invalid memory. But, what if you know you don't need more
6//! elements? `Vec` doesn't know about it, so that is where `cursed-collections` comes to the
7//! rescue. This create offers different collections that offer an extremely narrow interface in
8//! exchange of doing things that are unusual in safe rust.
9//!
10//! All collections in this crate are extremely cursed, yet respect the safety guaranties of Rust…
11//! assuming they are bug free!
12
13#![cfg_attr(not(test), no_std)]
14
15extern crate alloc;
16
17mod append_only_vec;
18mod lazy_array;
19mod symbol_table;
20
21pub use crate::append_only_vec::AppendOnlyVec;
22pub use crate::lazy_array::LazyArray;
23pub use crate::symbol_table::{Symbol, SymbolTable};