Skip to main content

Recognizer

Trait Recognizer 

Source
pub trait Recognizer: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn id(&self) -> &'static str;
    fn category(&self) -> Category;
    fn scan(&self) -> Result<Vec<Finding>>;
}
Expand description

A recognizer detects reclaimable disk space from a specific tool or ecosystem.

Recognizers come in two flavors:

  • Path-based: scan known fixed paths (caches, model stores)
  • Project-based: scan directories for marker files (build artifacts)

Required Methods§

Source

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

Human-readable name (e.g., “Xcode DerivedData”).

Source

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

Machine-readable identifier (e.g., “xcode-derived-data”).

Source

fn category(&self) -> Category

Which category this recognizer belongs to.

Source

fn scan(&self) -> Result<Vec<Finding>>

Scan for findings. Returns an empty vec if nothing found.

Implementors§