MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / yaml_string_or_field

Function yaml_string_or_field

packages/server/src/main/maestro.rs:393–399  ·  view source on GitHub ↗
(value: &YamlValue, field: &str)

Source from the content-addressed store, hash-verified

391}
392
393fn yaml_string_or_field(value: &YamlValue, field: &str) -> Option<String> {
394 value.as_str().map(str::to_owned).or_else(|| {
395 yaml_field(value, field)
396 .and_then(YamlValue::as_str)
397 .map(str::to_owned)
398 })
399}
400
401fn yaml_u64_or_field(value: &YamlValue, field: &str) -> Option<u64> {
402 value

Callers 3

parse_maestro_flow_yamlFunction · 0.85
run_maestro_commandFunction · 0.85
maestro_bundle_idFunction · 0.85

Calls 2

yaml_fieldFunction · 0.85
as_strMethod · 0.45

Tested by

no test coverage detected