Enum bracket_parse::Bracket [−][src]
Variants
Branch(Vec<Bracket>)
Leaf(String)
Empty
Methods
impl Bracket
[src]
impl Bracket
pub fn sib(self, s: Self) -> Self
[src]
pub fn sib(self, s: Self) -> Self
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]
pub fn sib_lf(self, s: &str) -> Self
chainging method for easily adding a leaf as a sibling from an &str
pub fn head<'a>(&'a self) -> &'a Bracket
[src]
pub fn head<'a>(&'a self) -> &'a Bracket
pub fn tail<'a>(&'a self) -> Tail<'a>
[src]
pub fn tail<'a>(&'a self) -> Tail<'a>
pub fn tail_n<'a>(&'a self, n: usize) -> Tail<'a>
[src]
pub fn tail_n<'a>(&'a self, n: usize) -> Tail<'a>
pub fn tail_h<'a>(&'a self, n: usize) -> &'a Bracket
[src]
pub fn tail_h<'a>(&'a self, n: usize) -> &'a Bracket
pub fn head_tail<'a>(&'a self) -> (&'a Bracket, Tail<'a>)
[src]
pub fn head_tail<'a>(&'a self) -> (&'a Bracket, Tail<'a>)
pub fn match_str<'a>(&'a self) -> &'a str
[src]
pub fn match_str<'a>(&'a self) -> &'a str
Trait Implementations
impl PartialEq for Bracket
[src]
impl PartialEq for Bracket
fn eq(&self, other: &Bracket) -> bool
[src]
fn eq(&self, other: &Bracket) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Bracket) -> bool
[src]
fn ne(&self, other: &Bracket) -> bool
This method tests for !=
.
impl Debug for Bracket
[src]
impl Debug for Bracket
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl FromStr for Bracket
[src]
impl FromStr for Bracket
type Err = String
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Bracket, String>
[src]
fn from_str(s: &str) -> Result<Bracket, String>
Parses a string s
to return a value of this type. Read more
impl<'a> IntoIterator for &'a Bracket
[src]
impl<'a> IntoIterator for &'a Bracket
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?
fn into_iter(self) -> Self::IntoIter
[src]
fn into_iter(self) -> Self::IntoIter
Creates an iterator from a value. Read more
impl Display for Bracket
[src]
impl Display for Bracket