pub struct PythonEdgeScan<'a> { /* private fields */ }Expand description
The whole-pass state the per-file walk shares: the terminal-segment index
over targets, and the namespace-candidate memo the walk fills as it goes.
Built once per inverted pass and then borrowed by every worker, so
brokk-bifrost-analysis’s fan-out (build_edge_output + parse_and_collect,
both analysis-owned) can hold it across the parallel closure.
Implementations§
Source§impl<'a> PythonEdgeScan<'a>
impl<'a> PythonEdgeScan<'a>
Sourcepub fn new(nodes: &HashSet<String>, targets: &'a HashSet<String>) -> Self
pub fn new(nodes: &HashSet<String>, targets: &'a HashSet<String>) -> Self
nodes remains the complete caller/callee graph domain. targets is the
subset whose inbound references this build must resolve and retain.
Sourcepub fn scan_file(
&self,
graph: &PythonGraphSource<'_>,
python: &dyn PythonUsageSource,
file: &ProjectFile,
input: &FileEdgeScanInput<'_>,
) -> PerFileEdges
pub fn scan_file( &self, graph: &PythonGraphSource<'_>, python: &dyn PythonUsageSource, file: &ProjectFile, input: &FileEdgeScanInput<'_>, ) -> PerFileEdges
Resolve every reference in one already-parsed file.
Reaches no other file’s tree: the import binder, same-file declarations, and the receiver-type facts are all derived from this file plus the analyzer’s own (tree-free) caches.
Auto Trait Implementations§
impl<'a> !Freeze for PythonEdgeScan<'a>
impl<'a> RefUnwindSafe for PythonEdgeScan<'a>
impl<'a> Send for PythonEdgeScan<'a>
impl<'a> Sync for PythonEdgeScan<'a>
impl<'a> Unpin for PythonEdgeScan<'a>
impl<'a> UnsafeUnpin for PythonEdgeScan<'a>
impl<'a> UnwindSafe for PythonEdgeScan<'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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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