pub trait JsonIO {
// Required methods
fn from_json(json: &str) -> Self;
fn to_json(&self) -> String;
fn read_json(path: &str) -> Self;
fn write_json(&self, path: &str);
}Expand description
A trait for reading and writing JSON files.
Required Methods§
Sourcefn write_json(&self, path: &str)
fn write_json(&self, path: &str)
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.