Skip to main content

load_machine_from_value

Function load_machine_from_value 

Source
pub fn load_machine_from_value(value: Value) -> Result<RawMachine, LoadError>
Expand description

Parse a single machine definition from a pre-parsed JSON value โ€” no YAML text.

A host can build a machine in code (e.g. with the serde_json::json! macro) and load it through the same deserialization path as load_machines, without serializing to a YAML string first. The first document of a multi-document machine is the root (SPEC ยง9).