pub struct GuardedResolver<'a> { /* private fields */ }Expand description
Resolves anchors that may come from elsewhere (Hive facts other engines
wrote) without turning the checkout into an oracle: only files the
engine may read for knowledge (source admission), and in a git checkout
only tracked ones, are ever read. Any other path is Missing without a
read, whether it exists or not, so a crafted anchor on .env learns
neither its content nor its existence. Such an anchor (a moved file’s old
path is gone, so it is never readable) is only looked for elsewhere through
the code graph, among readable files. Reads are memoised for the pass;
past MAX_RESOLVED_PER_PASS an anchor has no state (None).
Implementations§
Source§impl<'a> GuardedResolver<'a>
impl<'a> GuardedResolver<'a>
Sourcepub fn for_report(root: &'a Path) -> Self
pub fn for_report(root: &'a Path) -> Self
For a report that leaves the machine: tracked and admitted files.
Sourcepub fn local(root: &'a Path) -> Self
pub fn local(root: &'a Path) -> Self
For what this engine shows its own agents: admitted files.
Sourcepub fn resolve(&mut self, anchor: &CodeAnchor) -> Option<AnchorState>
pub fn resolve(&mut self, anchor: &CodeAnchor) -> Option<AnchorState>
Where anchor stands now; None only past the per-pass cap.
Auto Trait Implementations§
impl<'a> Forget for GuardedResolver<'a>
impl<'a> Freeze for GuardedResolver<'a>
impl<'a> Move for GuardedResolver<'a>
impl<'a> RefUnwindSafe for GuardedResolver<'a>
impl<'a> Send for GuardedResolver<'a>
impl<'a> Sync for GuardedResolver<'a>
impl<'a> Unpin for GuardedResolver<'a>
impl<'a> UnsafeUnpin for GuardedResolver<'a>
impl<'a> UnwindSafe for GuardedResolver<'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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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