pub trait CSEController {
type Node;
// Required methods
fn conditional_children(
node: &Self::Node,
) -> Option<(Vec<&Self::Node>, Vec<&Self::Node>)>;
fn is_valid(node: &Self::Node) -> bool;
fn is_ignored(&self, node: &Self::Node) -> bool;
fn generate_alias(&self) -> String;
fn rewrite(&mut self, node: &Self::Node, alias: &str) -> Self::Node;
// Provided methods
fn rewrite_f_down(&mut self, _node: &Self::Node) { ... }
fn rewrite_f_up(&mut self, _node: &Self::Node) { ... }
}
Expand description
The TreeNode
specific definition of elimination.
Required Associated Types§
Required Methods§
Sourcefn conditional_children(
node: &Self::Node,
) -> Option<(Vec<&Self::Node>, Vec<&Self::Node>)>
fn conditional_children( node: &Self::Node, ) -> Option<(Vec<&Self::Node>, Vec<&Self::Node>)>
Splits the children to normal and conditionally evaluated ones or returns None
if all are always evaluated.
fn is_valid(node: &Self::Node) -> bool
fn is_ignored(&self, node: &Self::Node) -> bool
fn generate_alias(&self) -> String
fn rewrite(&mut self, node: &Self::Node, alias: &str) -> Self::Node
Provided Methods§
fn rewrite_f_down(&mut self, _node: &Self::Node)
fn rewrite_f_up(&mut self, _node: &Self::Node)
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.