Skip to main content

Crate re_string_interner

Crate re_string_interner 

Source
Expand description

Yet another string interning library.

The main thing that makes this library different is that InternedString stores the hash of the string, which makes using it in lookups is really fast, especially when using nohash_hasher::IntMap.

The hash is assumed to be perfect, which means this library accepts the risk of hash collisions!

The interned strings are never freed, so don’t intern too many things.

Modules§

external

Macros§

declare_new_type
Declare a newtype wrapper around InternedString with all the convenience methods you would want.
declare_new_type_nonempty
Like declare_new_type!, but the string is validated.
intern_static
Intern a string literal once and return the cached value on subsequent calls.
intern_static_nonempty
Like intern_static!, but for types declared via declare_new_type_nonempty!.

Structs§

InternedString

Functions§

bytes_used