pub struct TreeFormatter<'a> { /* private fields */ }
Implementations§
Source§impl<'a> TreeFormatter<'a>
impl<'a> TreeFormatter<'a>
pub fn new( title: impl Display, inner: &'a mut impl Write, ) -> Result<Self, Box<dyn Error>>
pub fn with_context( title: impl Display, inner: &'a mut impl Write, context: &'a str, ) -> Result<Self, Box<dyn Error>>
pub fn context_format(&mut self, context_format: ContextFormat<'a>) -> &mut Self
pub fn prefix_format( &mut self, prefix_format: ItemPrefixFormat<'a>, ) -> &mut Self
pub fn begin_level(&mut self, is_last: bool)
pub fn end_level(&mut self)
pub fn write(&mut self, is_last: bool, item: impl Display) -> Result
pub fn write_fmt(&mut self, is_last: bool, item: Arguments<'a>) -> Result
pub fn write_level( &mut self, is_last: bool, items: impl Iterator<Item = impl Display>, ) -> Result
pub fn write_tree(&mut self, tree: impl TreeDisplay) -> Result
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for TreeFormatter<'a>
impl<'a> !RefUnwindSafe for TreeFormatter<'a>
impl<'a> !Send for TreeFormatter<'a>
impl<'a> !Sync for TreeFormatter<'a>
impl<'a> Unpin for TreeFormatter<'a>
impl<'a> !UnwindSafe for TreeFormatter<'a>
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