Expand description
Crate with parts of Rust std library ( different implementations, features not yet stabilised etc ),
in particular Box, Vec, Rc, String and collections::{ BTreeMap, BTreeSet, HashMap, HashSet }.
Box, Rc and String do not have all std methods/traits implemented.
HashMap and HashSet are imported from the hashbrown crate.
RcStr is a reference-counted string based on RcSlice.
The localalloc module has allocator implementations.
§Features
This crate supports the following cargo features:
serde: enables serialisation ofVec,String,BTreeMapandBTreeSetvia serde crate.unsafe-optim: Enable unsafe optimisations in release mode.dynbox: enables Boxing of dyn values, requires nightly toolchain. An alternative is to use the unsize_box macro.log-alloc: prints details of thread-local allocation when thread terminates.
Re-exports§
pub use vec::Vec;pub use vec::VecA;pub use string::String;pub use string::StringA;pub use boxed::Box;pub use boxed::BoxA;pub use rc::Rc;pub use rc::RcA;pub use rc::RcSlice;pub use rc::RcSliceA;pub use rc::RcStr;pub use rc::RcStrA;
Modules§
- alloc
- Memory allocation.
- boxed
Boxsimilar tostd::boxed::Box.- collections
- Containers: BTreeMap, BTreeSet, HashMap and HashSet.
- localalloc
- Allocator implementations.
- rc
Rcsimilar tostd::rc::Rc.- string
Stringsimilar tostd::string::String- vec
Vecsimilar tostd::vec::Vec.
Macros§
- unsize_
box - Macro to unsize a box.
- vec
- Creates a
Veccontaining the arguments. - veca
- Creates a
VecAcontaining the arguments.