Skip to main content

AuditGate

Trait AuditGate 

Source
pub trait AuditGate: Sync + Send {
    // Required methods
    fn name(&self) -> &'static str;
    fn explain(&self) -> &'static str;
    fn run(&self, site: &Site, opts: &AuditOptions) -> Vec<Finding>;
}
Expand description

Trait implemented by every audit gate.

Each gate is stateless and side-effect-free — it must not write anything to disk and must not hit the network unless explicitly asked to (see AuditOptions::skip_network).

Required Methods§

Source

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

Short identifier (snake_case, used on --gate <name>).

Source

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

Long-form explainer printed by ssg audit --explain --gate <name>.

Source

fn run(&self, site: &Site, opts: &AuditOptions) -> Vec<Finding>

Runs the gate against site and returns its findings.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§