Skip to main content

DiscoveryStrategy

Trait DiscoveryStrategy 

Source
pub trait DiscoveryStrategy: Send + Sync {
    // Required methods
    fn discover(&self, ctx: &DiscoveryContext) -> Vec<PathBuf>;
    fn name(&self) -> &'static str;

    // Provided method
    fn discover_attributed(
        &self,
        ctx: &DiscoveryContext,
    ) -> (Vec<PathBuf>, Vec<(PathBuf, &'static str)>) { ... }
}

Required Methods§

Source

fn discover(&self, ctx: &DiscoveryContext) -> Vec<PathBuf>

Source

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

Stable identifier for telemetry. Not a display name — it is written into the provenance dump and read back by analysis, so changing one renames a column in every recorded run.

Provided Methods§

Source

fn discover_attributed( &self, ctx: &DiscoveryContext, ) -> (Vec<PathBuf>, Vec<(PathBuf, &'static str)>)

Discovery plus which strategy surfaced each path.

The ensemble dedupes first-seen and used to throw the attribution away, which makes the universe ceiling undiagnosable: “never surfaced at all” and “surfaced but not selected” are different failures with different fixes (#130), and neither is visible from the selected set alone. The default is honest for a single strategy — everything it returns, it found — and only the ensemble needs to override it.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§