Skip to main content

Scanner

Trait Scanner 

Source
pub trait Scanner: Send + Sync {
    // Required methods
    fn scan(&self, config: &ScanConfig) -> Result<ScanResult>;
    fn progress(&self) -> Arc<ScanProgress>;

    // Provided method
    fn cancel(&self) { ... }
}
Expand description

Trait for implementing scanners

Required Methods§

Source

fn scan(&self, config: &ScanConfig) -> Result<ScanResult>

Run the scan with the given configuration

Source

fn progress(&self) -> Arc<ScanProgress>

Get the progress tracker

Provided Methods§

Source

fn cancel(&self)

Cancel the ongoing scan

Implementors§