Skip to main content

DiscoverySource

Trait DiscoverySource 

Source
pub trait DiscoverySource {
    // Required methods
    fn name(&self) -> &'static str;
    fn enumerate(
        &self,
        root: &Path,
        pathspec: &str,
    ) -> Result<Vec<String>, Error>;
}
Expand description

How the files matching a pathspec are enumerated. The trait exists because two enumerations are shipped and the caller chooses one explicitly.

Required Methods§

Source

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

A stable name for diagnostics: vcs or filesystem.

Source

fn enumerate(&self, root: &Path, pathspec: &str) -> Result<Vec<String>, Error>

Repository-relative paths matching pathspec (with its :(glob) prefix).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§