pub trait FmtAdapter: Write {
// Provided methods
fn indent(&mut self) -> Indent<'_, Self> { ... }
fn indent_with(&mut self, indent: &'static str) -> Indent<'_, Self> { ... }
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<Item: Display, Sep: Display>(
&mut self,
items: &[Item],
sep: Sep,
) -> Result { ... }
fn list_end<Item: Display, Sep: Display, End: Display>(
&mut self,
items: &[Item],
sep: Sep,
end: End,
) -> Result { ... }
fn list_wrap<Item: Display, Sep: Display, O: Display, E: Display>(
&mut self,
open: O,
items: &[Item],
sep: Sep,
close: E,
) -> Result { ... }
}Provided Methods§
Sourcefn indent_with(&mut self, indent: &'static str) -> Indent<'_, Self>
fn indent_with(&mut self, indent: &'static str) -> Indent<'_, Self>
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<Item: Display, Sep: Display>(
&mut self,
items: &[Item],
sep: Sep,
) -> Result
fn list<Item: Display, Sep: Display>( &mut self, items: &[Item], sep: Sep, ) -> Result
Formats bracketed lists of the kind (Item (Comma Item)*)?
fn list_end<Item: Display, Sep: Display, End: Display>( &mut self, items: &[Item], sep: Sep, end: End, ) -> Result
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.