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.
Printing a Value recurses once per nesting level; each
level runs through on_sufficient_stack, so printing a value of any
depth needs only RED_ZONE of the
caller’s stack.
Required Methods§
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".