pub trait TreeWalker: Sized {
    // Required methods
    fn apply_children(
        &self,
        op: &mut dyn FnMut(&Self) -> PolarsResult<VisitRecursion>
    ) -> PolarsResult<VisitRecursion>;
    fn map_children(
        self,
        op: &mut dyn FnMut(Self) -> PolarsResult<Self>
    ) -> PolarsResult<Self>;

    // Provided methods
    fn visit(
        &self,
        visitor: &mut dyn Visitor<Node = Self>
    ) -> PolarsResult<VisitRecursion> { ... }
    fn rewrite(
        self,
        rewriter: &mut dyn RewritingVisitor<Node = Self>
    ) -> PolarsResult<Self> { ... }
}
Expand description

An implementor of this trait decides how and in which order its nodes get traversed Implemented for crate::dsl::Expr and AexprNode.

Required Methods§

source

fn apply_children( &self, op: &mut dyn FnMut(&Self) -> PolarsResult<VisitRecursion> ) -> PolarsResult<VisitRecursion>

source

fn map_children( self, op: &mut dyn FnMut(Self) -> PolarsResult<Self> ) -> PolarsResult<Self>

Provided Methods§

source

fn visit( &self, visitor: &mut dyn Visitor<Node = Self> ) -> PolarsResult<VisitRecursion>

Walks all nodes in depth-first-order.

source

fn rewrite( self, rewriter: &mut dyn RewritingVisitor<Node = Self> ) -> PolarsResult<Self>

Object Safety§

This trait is not object safe.

Implementors§