pub struct PathIndex { /* private fields */ }Expand description
Precomputed lookup index for resolving file provenance and shard mtimes.
Implementations§
Source§impl PathIndex
impl PathIndex
Sourcepub fn build(ws: &WorkspaceIndex) -> Self
pub fn build(ws: &WorkspaceIndex) -> Self
Builds the path index from the current WorkspaceIndex state.
Source§impl PathIndex
impl PathIndex
Sourcepub fn may_match_fast_path(&self, ws: &WorkspaceIndex, file_path: &str) -> bool
pub fn may_match_fast_path(&self, ws: &WorkspaceIndex, file_path: &str) -> bool
Returns false when file_path cannot match the fast path.
Sourcepub fn shard_mtime_slow(
&self,
ws: &WorkspaceIndex,
file_path: &str,
) -> Option<SystemTime>
pub fn shard_mtime_slow( &self, ws: &WorkspaceIndex, file_path: &str, ) -> Option<SystemTime>
Resolves shard_mtime_for_file when the in-memory fast path does not match.
Sourcepub fn source_hash_slow(
&self,
ws: &WorkspaceIndex,
file_path: &str,
) -> Option<u64>
pub fn source_hash_slow( &self, ws: &WorkspaceIndex, file_path: &str, ) -> Option<u64>
Resolves source_hash_for_file when the in-memory fast path does not match.
Trait Implementations§
Auto Trait Implementations§
impl Forget for PathIndex
impl Freeze for PathIndex
impl Move for PathIndex
impl RefUnwindSafe for PathIndex
impl Send for PathIndex
impl Sync for PathIndex
impl Unpin for PathIndex
impl UnsafeUnpin for PathIndex
impl UnwindSafe for PathIndex
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