pub trait ToJSON {
// Required method
fn append_as_json_string(&self, buf: &mut String);
// Provided method
fn as_json_string(&self) -> String { ... }
}Expand description
Represents a JSON object that can be serialized to JSON
TODO depth for pretty
Required Methods§
fn append_as_json_string(&self, buf: &mut String)
Provided Methods§
fn as_json_string(&self) -> String
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".