pub struct Indent<'f, F>{
indent: &'static str,
needs_indent: bool,
f: &'f mut F,
}Expand description
Pads text with leading indentation after every newline
Fields§
§indent: &'static str§needs_indent: bool§f: &'f mut FImplementations§
Trait Implementations§
Auto Trait Implementations§
impl<'f, F> Freeze for Indent<'f, F>where
F: ?Sized,
impl<'f, F> RefUnwindSafe for Indent<'f, F>where
F: RefUnwindSafe + ?Sized,
impl<'f, F> Send for Indent<'f, F>
impl<'f, F> Sync for Indent<'f, F>
impl<'f, F> Unpin for Indent<'f, F>where
F: ?Sized,
impl<'f, F> !UnwindSafe for Indent<'f, F>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<W> FmtAdapter for W
impl<W> FmtAdapter for W
Source§fn indent_with(&mut self, indent: &'static str) -> Indent<'_, Self>
fn indent_with(&mut self, indent: &'static str) -> Indent<'_, Self>
Pastes
indent after each newline.Source§fn 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.Source§fn 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.Source§fn 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)*)?