pub enum ExprTree<'a> {
Expression(&'a Expression),
Block(&'a [Statement], &'a Option<Arc<Expression>>),
Statement(&'a Statement),
Assignment(&'a Assignment),
Single(&'a SingleExpression),
Call(&'a Call),
Match(&'a Match),
}
Variants§
Expression(&'a Expression)
Block(&'a [Statement], &'a Option<Arc<Expression>>)
Statement(&'a Statement)
Assignment(&'a Assignment)
Single(&'a SingleExpression)
Call(&'a Call)
Match(&'a Match)
Trait Implementations§
Source§impl TreeLike for ExprTree<'_>
impl TreeLike for ExprTree<'_>
Source§fn n_children(&self) -> usize
fn n_children(&self) -> usize
Accessor for the number of children this node has.
Source§fn nth_child(&self, n: usize) -> Option<Self>
fn nth_child(&self, n: usize) -> Option<Self>
Accessor for the nth child of the node, if a child with that index exists.
Source§fn pre_order_iter(self) -> PreOrderIter<Self>
fn pre_order_iter(self) -> PreOrderIter<Self>
Obtains an iterator of all the nodes rooted at the node, in pre-order.
Source§fn verbose_pre_order_iter(self) -> VerbosePreOrderIter<Self>
fn verbose_pre_order_iter(self) -> VerbosePreOrderIter<Self>
Obtains a verbose iterator of all the nodes rooted at the DAG, in pre-order. Read more
Source§fn post_order_iter(self) -> PostOrderIter<Self>
fn post_order_iter(self) -> PostOrderIter<Self>
Obtains an iterator of all the nodes rooted at the DAG, in post order. Read more
impl<'a> Copy for ExprTree<'a>
impl<'a> Eq for ExprTree<'a>
impl<'a> StructuralPartialEq for ExprTree<'a>
Auto Trait Implementations§
impl<'a> Freeze for ExprTree<'a>
impl<'a> RefUnwindSafe for ExprTree<'a>
impl<'a> Send for ExprTree<'a>
impl<'a> Sync for ExprTree<'a>
impl<'a> Unpin for ExprTree<'a>
impl<'a> UnwindSafe for ExprTree<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more