Skip to main content

map_entry

Function map_entry 

Source
pub fn map_entry<'a, V: Source>(
    entry: &'a V,
    path: &str,
) -> Result<(&'a V, &'a V), ProbeError>
Expand description

The key and the value of one map entry.

A map entry is a two-element array, [key, value], and not a JSON object: a JSON object keys on a string and map<long, float> does not. §7.4.1.1.4 restricts a key to a scalar, which is what makes the pair form sufficient.

§Errors

ProbeError::Mismatch for anything that is not a pair.