Expand description
The one YAML entry point of graphrt: YAML text to a serde_json::Value.
Every YAML document graphrt reads (workflows, plugin manifests, bundles,
eval and knowledge configs, the gateway config) is parsed here and then
deserialized from the Value. serde_saphyr’s deserializer is generic over
the visitor, so deserializing each type straight from YAML compiles its whole
deserializer again per type and per crate (≈ 430 KiB of a gateway binary
before this module). Going through one non-generic function keeps a single
copy. Types then deserialize from Value, which the JSON inputs use anyway;
errors name the offending path (crate::value_path) and, with a
crate::source_map::SourceMap, its line.
Enums§
- Error
- A YAML syntax error, with its location.
Error type compatible with
serde::de::Error.
Functions§
- describe
path (line L, column C): messagefor an error deserializingvalue, parsed fromtext.- from_
str - Parses YAML text into
Tthroughto_value. An error readspath (line L, column C): message, or just the message for a syntax error (which carries its own location). - to_
value - Parses YAML text into a
Value. Withstrict_booleans, onlytrueandfalseare booleans (YAML 1.2:yes,no,on,offstay strings).