simd_json::serde

Function to_borrowed_value

Source
pub fn to_borrowed_value<'se, T>(value: T) -> Result<BorrowedValue<'se>>
where T: Serialize,
Expand description

Tries to convert a struct that implements serde’s serialize into an BorrowedValue

§Errors

Will return Err if value fails to be turned into a borrowed value