pub struct Delimit<'f, F, E = &'static str>{
pub f: &'f mut F,
close: E,
}Expand description
Prints delimiters around anything formatted with this. Implies Indent
Fields§
§f: &'f mut FThe formatter
close: EImplementations§
Trait Implementations§
Auto Trait Implementations§
impl<'f, F, E> Freeze for Delimit<'f, F, E>
impl<'f, F, E> RefUnwindSafe for Delimit<'f, F, E>
impl<'f, F, E> Send for Delimit<'f, F, E>
impl<'f, F, E> Sync for Delimit<'f, F, E>
impl<'f, F, E> Unpin for Delimit<'f, F, E>
impl<'f, F, E = &'static str> !UnwindSafe for Delimit<'f, F, E>
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)*)?