[][src]Enum bracket_parse::Bracket

pub enum Bracket {
    Branch(Vec<Bracket>),
    Leaf(String),
    Empty,
}

Variants

Branch(Vec<Bracket>)
Leaf(String)
Empty

Implementations

impl Bracket[src]

pub fn sib(self, s: Self) -> Self[src]

chaining method for quickly creating a tree Adds a sibling to a bracket if it is a leaf makes it a parent.

pub fn sib_lf(self, s: &str) -> Self[src]

chainging method for easily adding a leaf as a sibling from an &str

pub fn head<'a>(&'a self) -> &'a Bracket[src]

pub fn tail<'a>(&'a self) -> Tail<'a>[src]

pub fn tail_n<'a>(&'a self, n: usize) -> Tail<'a>[src]

pub fn tail_h<'a>(&'a self, n: usize) -> &'a Bracket[src]

pub fn head_tail<'a>(&'a self) -> (&'a Bracket, Tail<'a>)[src]

pub fn match_str<'a>(&'a self) -> &'a str[src]

pub fn string_val(&self) -> String[src]

Trait Implementations

impl Debug for Bracket[src]

impl Display for Bracket[src]

impl FromStr for Bracket[src]

type Err = String

The associated error which can be returned from parsing.

impl<'a> IntoIterator for &'a Bracket[src]

type Item = &'a Bracket

The type of the elements being iterated over.

type IntoIter = BracketIter<'a>

Which kind of iterator are we turning this into?

impl PartialEq<Bracket> for Bracket[src]

impl StructuralPartialEq for Bracket[src]

Auto Trait Implementations

impl RefUnwindSafe for Bracket

impl Send for Bracket

impl Sync for Bracket

impl Unpin for Bracket

impl UnwindSafe for Bracket

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> ToString for T where
    T: Display + ?Sized
[src]

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.