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 PathIndexwhere
*const u8 is !null: Freeze,
PhantomData<OriginMeta>: Freeze,
PhantomData<ReaderPathMeta>: Freeze,
PhantomData<UniquePathEntry>: Freeze,
PhantomData<(PathBuf, Vec<u32>)>: Freeze,
PhantomData<(OsString, Vec<u32>)>: Freeze,
PhantomData<u32>: Freeze,
PhantomData<String>: Freeze,
PhantomData<(u64, DirectBlastRadius)>: Freeze,
impl Move for PathIndex
impl RefUnwindSafe for PathIndexwhere
OnceLock<EntryFsMeta>: RefUnwindSafe,
impl Send for PathIndex
impl Sync for PathIndex
impl Unpin for PathIndex
impl UnsafeUnpin for PathIndexwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<OriginMeta>: UnsafeUnpin,
PhantomData<ReaderPathMeta>: UnsafeUnpin,
PhantomData<UniquePathEntry>: UnsafeUnpin,
PhantomData<(PathBuf, Vec<u32>)>: UnsafeUnpin,
PhantomData<(OsString, Vec<u32>)>: UnsafeUnpin,
PhantomData<u32>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<(u64, DirectBlastRadius)>: UnsafeUnpin,
impl UnwindSafe for PathIndexwhere
RawVecInner: UnwindSafe,
OnceLock<EntryFsMeta>: UnwindSafe,
HashMap<PathBuf, Vec<u32>>: UnwindSafe,
HashMap<OsString, Vec<u32>>: UnwindSafe,
HashMap<u64, DirectBlastRadius>: UnwindSafe,
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