Trait SourceAnalysisQuery

Source
pub trait SourceAnalysisQuery {
    // Required methods
    fn should_ignore(&self, path: &Path, l: &usize) -> bool;
    fn normalise(&self, path: &Path, l: usize) -> (PathBuf, usize);
}
Expand description

When the LineAnalysis results are mapped to their files there needs to be an easy way to get the information back. For the container used implement this trait

Required Methods§

Source

fn should_ignore(&self, path: &Path, l: &usize) -> bool

Returns true if the line in the given file should be ignored

Source

fn normalise(&self, path: &Path, l: usize) -> (PathBuf, usize)

Takes a path and line number and normalises it to the logical line that should be represented in the statistics

Implementations on Foreign Types§

Source§

impl SourceAnalysisQuery for HashMap<PathBuf, LineAnalysis>

Source§

fn should_ignore(&self, path: &Path, l: &usize) -> bool

Source§

fn normalise(&self, path: &Path, l: usize) -> (PathBuf, usize)

Implementors§