pub trait ToJSON {
// Required method
fn to_json(&self) -> String;
}Expand description
A data type that can be converted to a JSON-format string.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".