pub trait Discoverer: Send + Sync {
// Required method
fn discover(
&self,
root: &Path,
opts: &DiscoveryOptions,
) -> Result<Discovered>;
}Expand description
Trait every discoverer implements. The default impl is FsDiscoverer;
downstream tests / embedders may supply an in-memory variant by
implementing this trait directly.
Required Methods§
Sourcefn discover(&self, root: &Path, opts: &DiscoveryOptions) -> Result<Discovered>
fn discover(&self, root: &Path, opts: &DiscoveryOptions) -> Result<Discovered>
Walk root according to opts and produce a Discovered.
§Errors
Returns crate::Error when the root is missing, the workspace
breaches a configured cap, or the discovery walk hits a fatal I/O
failure. Non-fatal anomalies (broken symlinks, oversized files,
ambiguous classifications) accumulate in
Discovered::diagnostics.