| Linux | Windows | Codecov | Coveralls | Docs | Crates.io |
|:-------------------:|:-------------------:|:--------------------:|:--------------------:|:----------------:|:--------------------:|
| |
|
|
|
|
|
A data structure to cache strings efficiently, with minimal memory footprint and the ability to assicate the interned strings with unique symbols. These symbols allow for constant time comparisons and look-ups to the underlying interned string contents. Also, iterating through the interned strings is cache efficient.
M and a vector V is used.V stores the contents of interned strings while M has internal references into the string of V to avoid duplicates.V stores the strings with an indirection to avoid iterator invalidation.Licensed under either of
at your option.
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.
0.7.1
StringInterner::clone()std::iter::Extend for StringInternerSym::from_usize now avoids using unsafe codeFromIterator impl of StringInternerThanks YOSHIOKA Takuma for implementing this release.
0.7.0
Symbol for types that are From<usize> and Into<usize>StringInterner::clear API since its usage breaks invariantsStringInterner::{capacity, reserve} APIsSym that is a thin wrapper around NonZeroU32 (idea by koute)DefaultStringInterner a type alias for the new StringInterner<Sym>FromIterator impl to StringInterner<S: Sym>html_root_url to crate rootThanks matklad for suggestions and impulses
0.6.3
StringInterner's Send impl didn't respect its generic HashBuilder parameter. Fixes GitHub issue #4.0.6.2
shrink_to_fit public method to StringInterner - (by artemshein)0.6.1
str) was broken due to dangling pointers (Thanks to artemshein for fixing it!)0.6.0
PartialEq implementation for StringInternerStringInterner generic over BuildHasher to allow for custom hashers0.5.0
IntoIterator trait implementation for StringInterner0.4.0
Unsigned for Symbol0.3.3
Send and Sync to InternalStrRef to make StringInterner itself Send and Sync