Expand description
Conversion between the merge IR and the native JSON/TOML value types.
Merge runs on Value, so these fire exactly twice per run: once per layer
on the way in, once on the whole document on the way out. Free functions
rather than From/TryFrom impls so the only way into or out of a format is
by name, from crate::format.
Structs§
- BadDatetime
- A
Value::Datetimecarrying text that is not a TOML datetime. - Integer
OutOf Range - An integer too large for TOML’s signed 64-bit integers.
- NonFinite
Float - A float JSON cannot represent: an infinity or a NaN.
- Null
InToml - Nulls survived into a document being converted to TOML.
Enums§
- Toml
Error - Why a document could not be converted to TOML.
Functions§
- from_
json - JSON → IR. Total: every JSON value has an IR counterpart.
- from_
toml - TOML → IR. Total: datetimes keep their source spelling rather than becoming strings, which is what lets a TOML datetime survive a mixed-format merge.
- object_
from_ json - JSON object → IR object.
- replace_
nulls - Substitutes
placeholderfor every null in the document. - to_json
- IR → JSON, rejecting up front the one thing JSON cannot hold.
- to_toml
- IR → TOML, rejecting up front what TOML cannot hold.