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, E>(&mut self, open: O, close: E) -> Delimit<'_, Self, E>
where O: Display,
E: Display { ... }
fn delimit_indented<O, E>(
&mut self,
open: O,
close: E,
) -> DelimitIndent<'_, Self, E>
where O: Display,
E: Display { ... }
fn list<Item, Sep>(&mut self, items: &[Item], sep: Sep) -> Result<(), Error>
where Item: Display,
Sep: Display { ... }
fn list_end<Item, Sep, End>(
&mut self,
items: &[Item],
sep: Sep,
end: End,
) -> Result<(), Error>
where Item: Display,
Sep: Display,
End: Display { ... }
fn list_wrap<Item, Sep, O, E>(
&mut self,
open: O,
items: &[Item],
sep: Sep,
close: E,
) -> Result<(), Error>
where Item: Display,
Sep: Display,
O: Display,
E: Display { ... }
}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, E>(&mut self, open: O, close: E) -> Delimit<'_, Self, E>
fn delimit<O, E>(&mut self, open: O, close: E) -> Delimit<'_, Self, E>
Delimits a section with open and close.
Sourcefn delimit_indented<O, E>(
&mut self,
open: O,
close: E,
) -> DelimitIndent<'_, Self, E>
fn delimit_indented<O, E>( &mut self, open: O, close: E, ) -> DelimitIndent<'_, Self, E>
Delimits a section with open and close, raising the indent level within.
Sourcefn list<Item, Sep>(&mut self, items: &[Item], sep: Sep) -> Result<(), Error>
fn list<Item, Sep>(&mut self, items: &[Item], sep: Sep) -> Result<(), Error>
Formats bracketed lists of the kind (Item (Comma Item)*)?
fn list_end<Item, Sep, End>( &mut self, items: &[Item], sep: Sep, end: End, ) -> Result<(), Error>
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.