pub struct Formatter<'value, 'context, T: TreeDisplay> { /* private fields */ }Expand description
Configurable formatter for tree display.
A formatter holds a value that implements TreeDisplay along with
optional theme and context settings. It produces a formatted string
representation of the tree.
§Example
use tree_display::{Formatter, Theme};
let value = 0;
let output = Formatter::of(&value)
.theme(Theme::default())
.format();Implementations§
Auto Trait Implementations§
impl<'value, 'context, T> !RefUnwindSafe for Formatter<'value, 'context, T>
impl<'value, 'context, T> !Send for Formatter<'value, 'context, T>
impl<'value, 'context, T> !Sync for Formatter<'value, 'context, T>
impl<'value, 'context, T> !UnwindSafe for Formatter<'value, 'context, T>
impl<'value, 'context, T> Freeze for Formatter<'value, 'context, T>
impl<'value, 'context, T> Unpin for Formatter<'value, 'context, T>
impl<'value, 'context, T> UnsafeUnpin for Formatter<'value, 'context, T>where
&'value T: UnsafeUnpin,
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, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
Invokes
WrappingSpan::make_wrapped to wrap an AST node in a span.