Skip to main content

Module value

Module value 

Source
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::Datetime carrying text that is not a TOML datetime.
IntegerOutOfRange
An integer too large for TOML’s signed 64-bit integers.
NonFiniteFloat
A float JSON cannot represent: an infinity or a NaN.
NullInToml
Nulls survived into a document being converted to TOML.

Enums§

TomlError
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 placeholder for 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.