Skip to main content

TreeStyle

Struct TreeStyle 

Source
pub struct TreeStyle {
    pub root_marker: &'static str,
    pub vertical: &'static str,
    pub vertical_pad: &'static str,
    pub elbow: &'static str,
    pub branch: &'static str,
    pub node_connector: &'static str,
    pub output_child: &'static str,
    pub output_branch: &'static str,
    pub output_continuation: &'static str,
    pub output_padding: &'static str,
    pub padding: &'static str,
}
Expand description

A complete set of glyphs for drawing a plan tree.

Each field maps directly onto a position in the rendered output. The vertical_pad and padding fields keep child indentation aligned even when the elbow/branch glyphs change width.

Fields§

§root_marker: &'static str§vertical: &'static str§vertical_pad: &'static str§elbow: &'static str§branch: &'static str§node_connector: &'static str§output_child: &'static str§output_branch: &'static str§output_continuation: &'static str§output_padding: &'static str§padding: &'static str

Implementations§

Source§

impl TreeStyle

Source

pub const fn unicode() -> Self

Historical Unicode glyphs matching the gocmdpev parity output.

Source

pub const fn ascii() -> Self

Pure ASCII alternative for terminals or pipelines that mangle Unicode.

Source

pub const fn heavy() -> Self

Heavier Unicode box-drawing variant with bolder strokes.

Source

pub fn parse(name: &str) -> Option<TreeStyle>

Trait Implementations§

Source§

impl Clone for TreeStyle

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for TreeStyle

Source§

impl Debug for TreeStyle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TreeStyle

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for TreeStyle

Source§

impl PartialEq for TreeStyle

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TreeStyle

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.