Skip to main content

from_value

Function from_value 

Source
pub fn from_value<T>(value: &HoconValue) -> Result<T, DeserializeError>
Expand description

Deserialize an arbitrary HoconValue fragment into a typed value.

Accepts any node — object, array, or scalar — with the same HOCON-aware coercion used by Config::deserialize. Use this when you hold a &HoconValue (e.g. from Config::get or a Config::get_list element) and want it as T.

Mirrors serde_json::from_value, but borrows the value rather than consuming it.