pub struct Indenter { /* private fields */ }
Implementations§
source§impl Indenter
impl Indenter
An object used by the TreeFormat to control and track formatting settings.
pub fn next(&self) -> Indenter
sourcepub fn header_len(&self) -> usize
pub fn header_len(&self) -> usize
How long the header of a line should be for this indenter.
sourcepub fn line_header(&self, arms_to_continue: &Vec<bool>) -> String
pub fn line_header(&self, arms_to_continue: &Vec<bool>) -> String
Generate the text of the header for the line.
sourcepub fn pad_string(&self, continue_arms: &Vec<bool>, text: &String) -> String
pub fn pad_string(&self, continue_arms: &Vec<bool>, text: &String) -> String
Pads a string with the header, toggling branches based on the arms outside of the current layer.
sourcepub fn pad_tree(&self, tree: &RoseVecTree<String>) -> RoseVecTree<String>
pub fn pad_tree(&self, tree: &RoseVecTree<String>) -> RoseVecTree<String>
Pads every string in a RoseVecTree, producing a new, padded RoseVecTree.
Trait Implementations§
source§impl Default for Indenter
impl Default for Indenter
Very convenient, I’m not copy-pasting the fancy characters every single time.
impl Copy for Indenter
Auto Trait Implementations§
impl RefUnwindSafe for Indenter
impl Send for Indenter
impl Sync for Indenter
impl Unpin for Indenter
impl UnwindSafe for Indenter
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