pub trait FmtAdapter: Write {
// Provided methods
fn indent(&mut self) -> Indent<'_, Self> { ... }
fn indent_with<I: Display>(&mut self, indent: I) -> Indent<'_, Self, I> { ... }
fn delimit<O: Display, E: Display>(
&mut self,
open: O,
close: E,
) -> Delimit<'_, Self, E> { ... }
fn delimit_indented<O: Display, E: Display>(
&mut self,
open: O,
close: E,
) -> DelimitIndent<'_, Self, E> { ... }
fn list<Iter: IntoIterator<Item: Display>, Sep: Display>(
&mut self,
items: Iter,
sep: Sep,
) -> Result { ... }
fn list_wrap<Iter: IntoIterator<Item: Display>, Sep: Display, O: Display, E: Display>(
&mut self,
open: O,
items: Iter,
sep: Sep,
close: E,
) -> Result { ... }
}Provided Methods§
Sourcefn indent_with<I: Display>(&mut self, indent: I) -> Indent<'_, Self, I>
fn indent_with<I: Display>(&mut self, indent: I) -> Indent<'_, Self, I>
Pastes indent after each newline.
Sourcefn delimit<O: Display, E: Display>(
&mut self,
open: O,
close: E,
) -> Delimit<'_, Self, E>
fn delimit<O: Display, E: Display>( &mut self, open: O, close: E, ) -> Delimit<'_, Self, E>
Delimits a section with open and close.
Sourcefn delimit_indented<O: Display, E: Display>(
&mut self,
open: O,
close: E,
) -> DelimitIndent<'_, Self, E>
fn delimit_indented<O: Display, E: Display>( &mut self, open: O, close: E, ) -> DelimitIndent<'_, Self, E>
Delimits a section with open and close, raising the indent level within.
Sourcefn list<Iter: IntoIterator<Item: Display>, Sep: Display>(
&mut self,
items: Iter,
sep: Sep,
) -> Result
fn list<Iter: IntoIterator<Item: Display>, Sep: Display>( &mut self, items: Iter, sep: Sep, ) -> Result
Formats bracketed lists of the kind (Item (Comma Item)*)?
Sourcefn list_wrap<Iter: IntoIterator<Item: Display>, Sep: Display, O: Display, E: Display>(
&mut self,
open: O,
items: Iter,
sep: Sep,
close: E,
) -> Result
fn list_wrap<Iter: IntoIterator<Item: Display>, Sep: Display, O: Display, E: Display>( &mut self, open: O, items: Iter, sep: Sep, close: E, ) -> Result
Wraps a list in open and close.
This differs from FmtAdapter::delimit because it prints nothing
if the list is empty.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".