pub struct CodeFormatter<'a, T> { /* private fields */ }Expand description
Helper struct for efficiently dedent and indent multi line display implementations
§Explanation
This type allocates a string once to get the formatted result and then uses the internal formatter efficiently to: first dedent the output, then re-indent to the desired level.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for CodeFormatter<'a, T>
impl<'a, T> RefUnwindSafe for CodeFormatter<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for CodeFormatter<'a, T>where
T: Send,
impl<'a, T> Sync for CodeFormatter<'a, T>where
T: Sync,
impl<'a, T> Unpin for CodeFormatter<'a, T>
impl<'a, T> !UnwindSafe for CodeFormatter<'a, T>
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