Enum yarpl::Done [−][src]
Concrete syntax tree formed from a parsing function.
Variants
A leaf node - holds the match from the original string as well as it's name.
A nonterminal node that has a name and branches.
An empty node - holds nothing.
Implementations
impl Done
[src]
pub fn name(&self) -> Option<&'static str>
[src]
Returns this name.
pub fn children(&self) -> Option<Vec<Rc<Done>>>
[src]
Returns children of this Done
if it has any.
pub fn matched_string(&self) -> Option<String>
[src]
Returns the matched string of this Done
if it has one.
pub fn is_terminal(&self) -> bool
[src]
Returns whether this is a terminal node.
pub fn is_nonterminal(&self) -> bool
[src]
Returns whether this is a nonterminal node.
pub fn is_empty(&self) -> bool
[src]
Returns whether this is an empty node.
pub fn rename(&mut self, new_name: &'static str)
[src]
Trait Implementations
impl Clone for Done
[src]
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Done
[src]
impl Display for Done
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Done
[src]
impl !Send for Done
[src]
impl !Sync for Done
[src]
impl Unpin for Done
[src]
impl !UnwindSafe for Done
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,