Skip to main content

Analysis

Trait Analysis 

Source
pub trait Analysis<L: Language>: Default {
    type Data;

    // Required methods
    fn make(egraph: &EGraph<L, Self>, enode: &L) -> Self::Data;
    fn merge(&mut self, to: &mut Self::Data, from: Self::Data) -> bool;

    // Provided methods
    fn on_add(&self, _data: &mut Self::Data, _loc: Loc) { ... }
    fn is_compatible(&self, _data1: &Self::Data, _data2: &Self::Data) -> bool { ... }
}

Required Associated Types§

Required Methods§

Source

fn make(egraph: &EGraph<L, Self>, enode: &L) -> Self::Data

Source

fn merge(&mut self, to: &mut Self::Data, from: Self::Data) -> bool

Provided Methods§

Source

fn on_add(&self, _data: &mut Self::Data, _loc: Loc)

Source

fn is_compatible(&self, _data1: &Self::Data, _data2: &Self::Data) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<L: Language> Analysis<L> for ()

Source§

type Data = ()

Source§

fn make(_egraph: &EGraph<L, Self>, _enode: &L) -> Self::Data

Source§

fn merge(&mut self, _to: &mut Self::Data, _from: Self::Data) -> bool

Implementors§