Skip to main content

raw_as

Function raw_as 

Source
fn raw_as<T, U, const N: usize>(value: &T) -> Result<Raw<U, N>>
where T: Serialize,
Expand description

Serializes value into raw JSON labeled as U.

Raw<T, N> has identical layout for every phantom T at fixed N. Callers must ensure that the serialized JSON is valid for U.