pub struct PathMapper { /* private fields */ }Expand description
Strategies for mapping coverage file paths to repository file paths.
Implementations§
Source§impl PathMapper
impl PathMapper
pub fn new( strip_prefixes: Vec<String>, rules: BTreeMap<String, String>, snapshot: Option<&RepoSnapshot>, ) -> Self
pub fn with_options( strip_prefixes: Vec<String>, rules: BTreeMap<String, String>, ignore_globs: Vec<String>, case_sensitive: bool, snapshot: Option<&RepoSnapshot>, ) -> Self
Sourcepub fn resolve(
&mut self,
coverage_path: &str,
known_paths: &[&str],
) -> Option<String>
pub fn resolve( &mut self, coverage_path: &str, known_paths: &[&str], ) -> Option<String>
Resolve a coverage file path to a repository file path. Strategy chain: exact match → rule substitution → strip prefix → suffix match.
Sourcepub fn resolve_by_hash(&self, content_hash: &str) -> Option<String>
pub fn resolve_by_hash(&self, content_hash: &str) -> Option<String>
Resolve using content hash as fallback.
Auto Trait Implementations§
impl Freeze for PathMapper
impl RefUnwindSafe for PathMapper
impl Send for PathMapper
impl Sync for PathMapper
impl Unpin for PathMapper
impl UnsafeUnpin for PathMapper
impl UnwindSafe for PathMapper
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more