Skip to main content

to_value

Function to_value 

Source
pub fn to_value<S: Serialize>(value: S) -> Result<Value, SerdeError>
Expand description

Convert a Serialize value into a Value for template rendering.

Supports all standard Rust types and any #[derive(Serialize)] struct/enum. u64 values larger than i64::MAX are stored as F64.