struct DocumentResolutionIndex<'a> {
root: PathBuf,
canonical_root: PathBuf,
kinds_by_path: HashMap<&'a str, NodeKind>,
casefold_path_counts: HashMap<String, u32>,
scan_policy: &'a RootScanPolicy,
absent_states: RefCell<BTreeMap<String, DocumentTargetUnresolvedReason>>,
}Expand description
Exact staged file inventory plus platform-aware case and root checks.
Fields§
§root: PathBufSelected source root used only for bounded filesystem checks.
canonical_root: PathBufCanonical selected root used to reject symlink escape.
kinds_by_path: HashMap<&'a str, NodeKind>Exact case-preserving staged identities.
casefold_path_counts: HashMap<String, u32>Unicode-lowercase identity counts used to refuse guesses and collisions.
scan_policy: &'a RootScanPolicyEffective repository admission policy shared with full and incremental scans.
absent_states: RefCell<BTreeMap<String, DocumentTargetUnresolvedReason>>Consulted non-indexed states, memoized for repeated high-fan-out references.
Implementations§
Source§impl<'a> DocumentResolutionIndex<'a>
impl<'a> DocumentResolutionIndex<'a>
Sourcefn new(
root: &Path,
nodes: &'a [Node],
scan_policy: &'a RootScanPolicy,
) -> Result<Self, CliError>
fn new( root: &Path, nodes: &'a [Node], scan_policy: &'a RootScanPolicy, ) -> Result<Self, CliError>
Build one bounded exact-identity view from the staged source inventory.
Sourcefn unresolved_reason(
&self,
path: &str,
) -> Result<Option<DocumentTargetUnresolvedReason>, CliError>
fn unresolved_reason( &self, path: &str, ) -> Result<Option<DocumentTargetUnresolvedReason>, CliError>
Return a closed unresolved reason, or None for one exact admitted file.
Sourcefn absent_reason(
&self,
path: &str,
) -> Result<DocumentTargetUnresolvedReason, CliError>
fn absent_reason( &self, path: &str, ) -> Result<DocumentTargetUnresolvedReason, CliError>
Distinguish absent source from excluded or escaping filesystem state.
Sourcefn observed_absent_states(
&self,
) -> Vec<(String, DocumentTargetUnresolvedReason)>
fn observed_absent_states( &self, ) -> Vec<(String, DocumentTargetUnresolvedReason)>
Return the bounded states actually consulted during document resolution.
Sourcefn missing_or_escaping_ancestor(
&self,
native: &Path,
) -> DocumentTargetUnresolvedReason
fn missing_or_escaping_ancestor( &self, native: &Path, ) -> DocumentTargetUnresolvedReason
Check the nearest existing ancestor so a missing child cannot hide symlink escape.
Auto Trait Implementations§
impl<'a> !Freeze for DocumentResolutionIndex<'a>
impl<'a> !RefUnwindSafe for DocumentResolutionIndex<'a>
impl<'a> !Sync for DocumentResolutionIndex<'a>
impl<'a> Send for DocumentResolutionIndex<'a>
impl<'a> Unpin for DocumentResolutionIndex<'a>
impl<'a> UnsafeUnpin for DocumentResolutionIndex<'a>
impl<'a> UnwindSafe for DocumentResolutionIndex<'a>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more