Struct mycelium_util::fmt::WithIndent
source · pub struct WithIndent<'writer, W> { /* private fields */ }
Expand description
Wraps a type implementing core::fmt::Write
so that every newline written to
that writer is indented a given amount.
Trait Implementations§
source§impl<'writer, W: Debug> Debug for WithIndent<'writer, W>
impl<'writer, W: Debug> Debug for WithIndent<'writer, W>
Auto Trait Implementations§
impl<'writer, W> Freeze for WithIndent<'writer, W>
impl<'writer, W> RefUnwindSafe for WithIndent<'writer, W>where
W: RefUnwindSafe,
impl<'writer, W> Send for WithIndent<'writer, W>where
W: Send,
impl<'writer, W> Sync for WithIndent<'writer, W>where
W: Sync,
impl<'writer, W> Unpin for WithIndent<'writer, W>
impl<'writer, W> !UnwindSafe for WithIndent<'writer, W>
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<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<W> WriteExt for Wwhere
W: Write,
impl<W> WriteExt for Wwhere
W: Write,
source§fn with_indent(&mut self, indent: usize) -> WithIndent<'_, Self>where
Self: Sized,
fn with_indent(&mut self, indent: usize) -> WithIndent<'_, Self>where
Self: Sized,
Wraps
self
in a WithIndent
writer that indents every new line
that’s written to it by indent
spaces.