Cargo Features
[dependencies]
string-interner = { version = "0.18.0", default-features = false, features = ["std", "serde", "inline-more", "backends", "test-allocations"] }
- default = backends, inline-more, serde, std
-
These default features are set whenever
string-interner
is added without
somewhere in the dependency tree.default-features = false - std default
-
serde:
Provide impls for common standard library types like Vec<T> and HashMap<K, V>.
Requires a dependency on the Rust standard library. - serde default
-
Enable this if you need
Serde
serialization and deserialization support.Enabled by default.
Enables serde
- inline-more default
-
Use this to mark more public functions of the StringInterner (and hashbrown)
as inline. This significantly increases compile times of the crate but improves upon runtime execution.
Enabled by default.Enables inline-more of hashbrown
- backends default
-
Enables the backends provided out of the box by this crate.
Disable this if you want to only use your own backend and thus don't have the need for those present backends. Reduces compilation time of this crate.
Enabled by default.Affects
backend::DefaultBackend
,string-interner::DefaultStringInterner
… - test-allocations
-
Enables testing of memory heap allocations.
These tests are disabled by default since they are slow compared to the other unit tests and also are required to run single threaded using
--test-threads 1
asrustc
argument:cargo test --feature test-allocations -- --test-threads 1