Skip to main content

Rule

Trait Rule 

Source
pub trait Rule: Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn apply(&self, resource: &mut Value) -> Vec<Edit>;
}

Required Methods§

Source

fn name(&self) -> &'static str

Name used to enable the rule in a manifest.

Source

fn apply(&self, resource: &mut Value) -> Vec<Edit>

Rewrites resource in place and returns what changed.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§