pub trait JsonEncode: Sized {
// Required methods
fn json_len(&self) -> usize;
fn write_into<W: Write>(&self, w: &mut W);
// Provided methods
fn write_json(&self, out: &mut Vec<u8>) { ... }
fn encode_json(&self) -> Vec<u8> ⓘ { ... }
}Required Methods§
Provided Methods§
fn write_json(&self, out: &mut Vec<u8>)
fn encode_json(&self) -> Vec<u8> ⓘ
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".