Skip to main content

ScanTrigger

Trait ScanTrigger 

Source
pub trait ScanTrigger:
    Send
    + Sync
    + 'static {
    // Required method
    fn trigger<'a>(
        &'a self,
        source: ScanTriggerSource,
        project_id: Option<String>,
        repo: Option<String>,
        run_overrides: Option<ScanRunOverrides>,
    ) -> ScanFuture<'a>;
}
Expand description

Plug that lets the API hand off a manual scan request to the daemon that owns the run dispatcher. The daemon wires the production impl; tests substitute a stub.

Required Methods§

Source

fn trigger<'a>( &'a self, source: ScanTriggerSource, project_id: Option<String>, repo: Option<String>, run_overrides: Option<ScanRunOverrides>, ) -> ScanFuture<'a>

Kick off a scan. Returns the freshly minted run id.

  • source records the surface that requested the scan; the daemon stamps it onto runs.triggered_by.
  • project_id, when set, restricts the run to repos belonging to that project; repo further narrows to a single repo. Passing both unset scans every enabled repo.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§