Struct rosary::tree_format::Indenter[][src]

pub struct Indenter { /* fields omitted */ }

Implementations

impl Indenter[src]

An object used by the TreeFormat to control and track formatting settings.

pub fn next(&self) -> Indenter[src]

pub fn header_len(&self) -> usize[src]

How long the header of a line should be for this indenter.

pub fn line_header(&self, arms_to_continue: &Vec<bool>) -> String[src]

Generate the text of the header for the line.

pub fn pad_string(&self, continue_arms: &Vec<bool>, text: &String) -> String[src]

Pads a string with the header, toggling branches based on the arms outside of the current layer.

pub fn pad_tree(&self, tree: &RoseTree<String>) -> RoseTree<String>[src]

Pads every string in a RoseTree, producing a new, padded RoseTree.

Trait Implementations

impl Clone for Indenter[src]

impl Copy for Indenter[src]

impl Debug for Indenter[src]

impl Default for Indenter[src]

Very convenient, I’m not copy-pasting the fancy characters every single time.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.