Skip to main content

to_value

Function to_value 

Source
pub fn to_value<T>(value: &T) -> Result<Value, EncodeError>
where T: Serialize,
Expand description

Converts any serde-serializable value into the crate’s dynamic Value model.

§Errors

Returns EncodeError when serde serialization fails.