Function extract_value

Source
pub fn extract_value<T: Serialize, P: IqPath, V: DeserializeOwned>(
    source: &T,
    path: P,
) -> Result<Option<V>, IqError>
Expand description

Extract a value, which must implement Deserialize, from a value, at the given path.

This function uses a JSON representation of the deep value as intermediate step, which adds some (usually light) overload but also allows to extract in a different type than the real type of the deep value.