Now that we have a basic Rule API setup, we can start to implement some basic analysis rules. We need to create a new struct and implement the Rule trait on it. #[derive(Debug)] pub struct ValidFunctionRule; impl Rule for ValidFunctionRule { fn should_run(&self, node: &dyn Node) -> bool { downcast:: (node).is_some()} fn run(&mut self, node: &mut dyn Node, definitions: &DefinitionCollection) { todo!()} }
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.