Skip to main content

Crate pstd

Crate pstd 

Source
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 currently only have minimal 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 fast thread-local bump allocators.

§Features

This crate supports the following cargo features:

  • serde : enables serialisation of BTreeMap and BTreeSet via serde crate.
  • unsafe-optim : Enable unsafe optimisations in release mode.
  • dynbox : enables Boxing of dyn values, requires nightly toolchain.
  • log-bump : prints details of bump allocation when thread terminates.

Re-exports§

pub use vec::Vec;
pub use string::String;
pub use boxed::Box;
pub use rc::Rc;
pub use rc::RcSlice;
pub use rc::RcStr;

Modules§

alloc
Memory allocation.
boxed
Box similar to std::boxed::Box.
collections
Containers: BTreeMap, BTreeSet, HashMap and HashSet.
localalloc
Thread-local bump allocators.
rc
Rc similar to std::rc::Rc.
string
String similar to std::string::String
vec
Vec similar to std::vec::Vec.

Macros§

vec
Creates a Vec containing the arguments.