pub trait Visitor<'a, 'b> {
    type Producer: ExprProducer<'a, 'b>;

    // Required methods
    fn visit_expr(&mut self, expr: CExpr<'b>) -> Option<&'a Expr<'a>>;
    fn detach_allocator(&self) -> Option<&'a Allocator<'a>>;

    // Provided methods
    fn visit_expr_(&mut self, expr: CExpr<'b>) -> Option<Expr<'a>> { ... }
    fn visit_binding(&mut self, _: &Symbol) -> Option<Symbol> { ... }
    fn visit_type(&mut self, _: &'b ArcType) -> Option<ArcType> { ... }
    fn visit_pattern(&mut self, expr: &'b Pattern) -> Option<Pattern> { ... }
    fn visit_alt(&mut self, alt: &'b Alternative<'b>) -> Option<Alternative<'a>> { ... }
    fn detach_producer(&self) -> Option<Self::Producer> { ... }
    fn producer(&self) -> Self::Producer { ... }
    fn allocator(&self) -> &'a Allocator<'a> { ... }
}

Required Associated Types§

Required Methods§

source

fn visit_expr(&mut self, expr: CExpr<'b>) -> Option<&'a Expr<'a>>

source

fn detach_allocator(&self) -> Option<&'a Allocator<'a>>

Provided Methods§

source

fn visit_expr_(&mut self, expr: CExpr<'b>) -> Option<Expr<'a>>

source

fn visit_binding(&mut self, _: &Symbol) -> Option<Symbol>

source

fn visit_type(&mut self, _: &'b ArcType) -> Option<ArcType>

source

fn visit_pattern(&mut self, expr: &'b Pattern) -> Option<Pattern>

source

fn visit_alt(&mut self, alt: &'b Alternative<'b>) -> Option<Alternative<'a>>

source

fn detach_producer(&self) -> Option<Self::Producer>

source

fn producer(&self) -> Self::Producer

source

fn allocator(&self) -> &'a Allocator<'a>

Implementors§

source§

impl<'a> Visitor<'a, 'a> for SameLifetime<'a>

source§

impl<'a, 'b> Visitor<'a, 'b> for DifferentLifetime<'a, 'b>

source§

impl<'a, 'l, 'g, 'expr> Visitor<'l, 'expr> for Pure<'a, 'l, 'g>

§

type Producer = DifferentLifetime<'l, 'expr>

source§

impl<'e> Visitor<'e, 'e> for DepGraph<'e>