pub trait Rule<'a> {
// Required method
fn check(
&self,
node: Node<'a>,
prog: &AstNode<Program>,
) -> Result<Vec<Discovered>>;
}
Expand description
Check the provided AST for any found rule violations.
The Rule trait is automatically implemented for a few other types, but it can also be manually implemented as required.
Required Methods§
Sourcefn check(
&self,
node: Node<'a>,
prog: &AstNode<Program>,
) -> Result<Vec<Discovered>>
fn check( &self, node: Node<'a>, prog: &AstNode<Program>, ) -> Result<Vec<Discovered>>
Check the AST at this specific node for any Finding(s).