cds

Crates.iocds
lib.rscds
version0.10.0
sourcesrc
created_at2021-11-24 16:26:28.557353
updated_at2022-10-06 21:08:04.56439
descriptionCollection of Optimized Data Structures
homepage
repositoryhttps://github.com/r-bk/cds
max_upload_size
id486906
size406,622
Rafael Buchbinder (r-bk)

documentation

README

crates.io docs.rs

cds - Collection of Optimized Data Structures

cds implements handy data structures written for speed, small memory footprint and security.

What's included?

  • SpareMemoryPolicy - a customizable policy for handling spare memory in collections (allows wiping unused memory to delete potentially sensitive data)

  • LengthType - a customizable type to track collection length (allows creation of very compact collection types)

  • ArrayVec - an array with vector-like API

  • ArrayString - an array with string-like API

  • lformat! - a macro to format a string on stack, without memory allocation (yields an ArrayString)

  • aformat! - a macro to format a string on stack, without memory allocation (yields a Result<ArrayString>)

  • SmallVec - a growable array with optimization for small capacities

Crate Features

  • arrayvec - enables ArrayVec
  • arraystring - enables ArrayString
  • smallvec - enables SmallVec, implies alloc.
  • alloc - enables usage of the standard alloc crate
  • std- enables usage of the Rust standard library. Implies alloc, and enables implementation of standard traits which are not available in core. Without this feature the crate is no_std.

By default, all optional features are enabled. To build in no_std environment, or to avoid compilation of unneeded functionality, use default-features = false and choose the required features explicitly.

Documentation

The documentation is at docs.rs/cds

Roadmap

  • SmallString - a string with local capacity to avoid heap allocation

Changelog

The changelog is maintained in CHANGELOG.md

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Tags

small secure vector string array smallvec smallstr

Commit count: 211

cargo fmt