Trait JsonEncodeExt

Source
pub trait JsonEncodeExt
where Self: Serialize,
{ // Required methods fn to_json(&self) -> Result<Value, Error>; fn to_json_string(&self) -> Result<String, Error>; fn to_json_pretty_string(&self) -> Result<String, Error>; }

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> JsonEncodeExt for T
where T: Serialize,