Struct gfx_traits::print_tree::PrintTree
source · pub struct PrintTree {
level: u32,
queued_item: Option<String>,
}
Expand description
A struct that makes it easier to print out a pretty tree of data, which can be visually scanned more easily.
Fields§
§level: u32
The current level of recursion.
queued_item: Option<String>
An item which is queued up, so that we can determine if we need a mid-tree prefix or a branch ending prefix.
Implementations§
source§impl PrintTree
impl PrintTree
pub fn new(title: String) -> PrintTree
sourcepub fn new_level(&mut self, queued_title: String)
pub fn new_level(&mut self, queued_title: String)
Descend one level in the tree with the given title string.
fn print_level_prefix(&self)
fn print_level_child_indentation(&self)
fn flush_queued_item(&mut self, prefix: &str)
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for PrintTree
impl Send for PrintTree
impl Sync for PrintTree
impl Unpin for PrintTree
impl UnwindSafe for PrintTree
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