Skip to main content

reference_find_object_by_string_field

Function reference_find_object_by_string_field 

Source
pub fn reference_find_object_by_string_field<'a>(
    root: &'a Value,
    field: &str,
    expected: &str,
) -> Option<&'a Value>
Expand description

Finds an object by an exact string field.

§Parameters

§Returns

Returns Some when crate::reference::reference_find_object_by_string_field can produce a value and None otherwise.

§Performance

Performance is proportional to the size of the supplied inputs and any parsed or loaded data consumed by crate::reference::reference_find_object_by_string_field.

§Examples

ⓘ
let _result = pharos_runtime_docs::reference::reference_find_object_by_string_field(std::path::Path::new("."), "field", "value");