pub trait JsonPrint {
// Required method
fn fmt_with(
&self,
f: &mut Formatter<'_>,
options: &JsonPrintOptions,
indent: usize,
) -> Result;
// Provided methods
fn pretty_print(&self) -> Printed<'_, 'static, Self> { ... }
fn compact_print(&self) -> Printed<'_, 'static, Self> { ... }
fn inline_print(&self) -> Printed<'_, 'static, Self> { ... }
fn print_with<'o>(
&self,
options: &'o JsonPrintOptions,
) -> Printed<'_, 'o, Self> { ... }
}Expand description
Print methods.
Required Methods§
fn fmt_with( &self, f: &mut Formatter<'_>, options: &JsonPrintOptions, indent: usize, ) -> Result
Provided Methods§
Sourcefn pretty_print(&self) -> Printed<'_, 'static, Self>
fn pretty_print(&self) -> Printed<'_, 'static, Self>
Print the value with Options::pretty options.
Sourcefn compact_print(&self) -> Printed<'_, 'static, Self>
fn compact_print(&self) -> Printed<'_, 'static, Self>
Print the value with Options::compact options.
Sourcefn inline_print(&self) -> Printed<'_, 'static, Self>
fn inline_print(&self) -> Printed<'_, 'static, Self>
Print the value with Options::inline options.
Sourcefn print_with<'o>(&self, options: &'o JsonPrintOptions) -> Printed<'_, 'o, Self>
fn print_with<'o>(&self, options: &'o JsonPrintOptions) -> Printed<'_, 'o, Self>
Print the value with the given options.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".