pub trait Print {
// Required method
fn fmt_with(
&self,
f: &mut Formatter<'_>,
options: &Options,
indent: usize,
) -> Result<(), Error>;
// Provided methods
fn pretty_print(&self) -> Printed<'_, Self> { ... }
fn compact_print(&self) -> Printed<'_, Self> { ... }
fn inline_print(&self) -> Printed<'_, Self> { ... }
fn print_with(&self, options: Options) -> Printed<'_, Self> { ... }
}Expand description
Print methods.
Required Methods§
fn fmt_with( &self, f: &mut Formatter<'_>, options: &Options, indent: usize, ) -> Result<(), Error>
Provided Methods§
Sourcefn pretty_print(&self) -> Printed<'_, Self>
fn pretty_print(&self) -> Printed<'_, Self>
Print the value with Options::pretty options.
Sourcefn compact_print(&self) -> Printed<'_, Self>
fn compact_print(&self) -> Printed<'_, Self>
Print the value with Options::compact options.
Sourcefn inline_print(&self) -> Printed<'_, Self>
fn inline_print(&self) -> Printed<'_, Self>
Print the value with Options::inline options.
Sourcefn print_with(&self, options: Options) -> Printed<'_, Self>
fn print_with(&self, options: Options) -> Printed<'_, 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".