Cargo Features
[dependencies]
toml = { version = "0.9.11+spec-1.1.0", default-features = false, features = ["std", "serde", "parse", "display", "fast_hash", "debug", "unbounded", "preserve_order"] }
- default = display, parse, serde, std
-
These default features are set whenever
tomlis added withoutsomewhere in the dependency tree.default-features = false - std default debug? preserve_order?
-
Enables std of optional indexmap, optional serde_core, serde_spanned, toml_datetime, optional toml_parser, and optional toml_writer
serde_core:
Provide impls for common standard library types like Vec<T> and HashMap<K, V>.
Requires a dependency on the Rust standard library. - serde default
-
Enables serde_core, serde of serde_spanned and toml_datetime
Affects
toml::value,toml::ser,toml::macros,de::from_str,de::from_slice… - parse default
-
Enables toml_parser and winnow
Affects
de::from_str,de::from_slice… - display default
-
Enables toml_writer
Affects
ser::to_string,ser::to_string_pretty… - fast_hash = preserve_order
-
Enables foldhash
- debug = std
-
Enables anstream and anstyle, debug of optional toml_parser
- unbounded
-
Provide a method disable_recursion_limit to parse arbitrarily deep structures without any consideration for overflowing the stack. Additionally you will need to be careful around other recursive operations on the parsed result which may overflow the stack after deserialization has completed, including,
but not limited to, Display and Debug and Drop impls. - preserve_order fast_hash? = std
-
Use indexmap rather than BTreeMap as the map type of toml::Value.
This allows data to be read into a Value and written back to a TOML string while preserving the order of map keys in the input.Enables indexmap