Enum treebender::syntree::SynTree[][src]

pub enum SynTree<T, U> {
    Branch(Constituent<T>, Vec<SynTree<T, U>>),
    Leaf(Word<U>),
}

Variants

Branch(Constituent<T>, Vec<SynTree<T, U>>)
Leaf(Word<U>)

Implementations

impl<T, U> SynTree<T, U>[src]

pub fn is_leaf(&self) -> bool[src]

pub fn is_branch(&self) -> bool[src]

pub fn get_leaf(&self) -> Option<&Word<U>>[src]

pub fn get_branch(&self) -> Option<(&Constituent<T>, &Vec<SynTree<T, U>>)>[src]

pub fn into_branch(self) -> Option<(Constituent<T>, Vec<SynTree<T, U>>)>[src]

pub fn map<V, W>(
    &self,
    map_branch: fn(_: &Constituent<T>) -> V,
    map_leaf: fn(_: &Word<U>) -> W
) -> SynTree<V, W>
[src]

Trait Implementations

impl<T: Clone, U: Clone> Clone for SynTree<T, U>[src]

impl<T: Debug, U: Debug> Debug for SynTree<T, U>[src]

impl<T, U> Display for SynTree<T, U> where
    T: Display,
    U: Display
[src]

impl<T: PartialEq, U: PartialEq> PartialEq<SynTree<T, U>> for SynTree<T, U>[src]

impl<T, U> StructuralPartialEq for SynTree<T, U>[src]

Auto Trait Implementations

impl<T, U> RefUnwindSafe for SynTree<T, U> where
    T: RefUnwindSafe,
    U: RefUnwindSafe

impl<T, U> Send for SynTree<T, U> where
    T: Send,
    U: Send

impl<T, U> Sync for SynTree<T, U> where
    T: Sync,
    U: Sync

impl<T, U> Unpin for SynTree<T, U> where
    T: Unpin,
    U: Unpin

impl<T, U> UnwindSafe for SynTree<T, U> where
    T: UnwindSafe,
    U: UnwindSafe

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> 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.