pub trait Engine {
// Required methods
fn matches(
&self,
patterns: impl IntoIterator<Item = impl AsRef<Path>>,
) -> impl Iterator<Item = Result<PathBuf, PathBuf>>;
fn resolve(&self, path: impl AsRef<Path>) -> PathBuf;
fn is_ignored(&self, path: impl AsRef<Path>) -> bool;
fn is_range_modified(
&self,
path: impl AsRef<Path>,
range: (usize, usize),
) -> bool;
// Provided methods
fn read_to_string(&self, path: impl AsRef<Path>) -> Result<String, Error> { ... }
fn check(&self, path: impl AsRef<Path>) -> Result<(), Vec<String>> { ... }
}Required Methods§
Sourcefn matches(
&self,
patterns: impl IntoIterator<Item = impl AsRef<Path>>,
) -> impl Iterator<Item = Result<PathBuf, PathBuf>>
fn matches( &self, patterns: impl IntoIterator<Item = impl AsRef<Path>>, ) -> impl Iterator<Item = Result<PathBuf, PathBuf>>
Iterate over changed files that match the given patterns and patterns that don’t match any file.
If patterns is empty, all changed files are returned.
Sourcefn is_ignored(&self, path: impl AsRef<Path>) -> bool
fn is_ignored(&self, path: impl AsRef<Path>) -> bool
Check if a file has been ignored.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".