struct DisplayIndent {
curr: String,
}
Expand description
Track the indentation of the tree.
Fields§
§curr: String
Implementations§
Source§impl DisplayIndent
impl DisplayIndent
fn new() -> Self
Sourcefn increment(&mut self, formatter: &DisplayFmt, is_last: bool)
fn increment(&mut self, formatter: &DisplayFmt, is_last: bool)
Increment the indentation by one. Note: need to know if this is the last child or not because the presence of other children changes the way the indentation is shown.
Sourcefn decrement(&mut self, formatter: &DisplayFmt)
fn decrement(&mut self, formatter: &DisplayFmt)
Pop the last level of indentation.
Auto Trait Implementations§
impl Freeze for DisplayIndent
impl RefUnwindSafe for DisplayIndent
impl Send for DisplayIndent
impl Sync for DisplayIndent
impl Unpin for DisplayIndent
impl UnwindSafe for DisplayIndent
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes