pub struct PythonUsageIndex { /* private fields */ }Expand description
Re-export and reverse-import indices over the Python workspace.
Implementations§
Source§impl PythonUsageIndex
impl PythonUsageIndex
The complete immutable authority. Lazy per-file syntax memos are not part of it.
Sourcepub fn build(
python: &dyn PythonSource,
token: QueryToken<'_>,
keep_going: &dyn Fn() -> bool,
) -> Option<Self>
pub fn build( python: &dyn PythonSource, token: QueryToken<'_>, keep_going: &dyn Fn() -> bool, ) -> Option<Self>
Takes PythonSource, not PythonUsageSource: the cell this
build fills is only reachable through the latter, so the narrower
parameter is what stops the build from re-entering it.
pub fn seeds_for_target( &self, target_file: &ProjectFile, target_short: &str, ) -> BTreeSet<(ProjectFile, String)>
pub fn matching_edges_for_importer( &self, importer: &ProjectFile, seeds: &BTreeSet<(ProjectFile, String)>, ) -> Vec<ImportEdge>
pub fn importer_files_for_seeds( &self, seeds: &BTreeSet<(ProjectFile, String)>, ) -> HashSet<ProjectFile>
pub fn resolve_module_files( &self, importing_file: &ProjectFile, module_specifier: &str, ) -> Vec<ProjectFile>
Trait Implementations§
Source§impl Debug for PythonUsageIndex
impl Debug for PythonUsageIndex
Auto Trait Implementations§
impl !RefUnwindSafe for PythonUsageIndex
impl !UnwindSafe for PythonUsageIndex
impl Forget for PythonUsageIndex
impl Freeze for PythonUsageIndex
impl Move for PythonUsageIndex
impl Send for PythonUsageIndex
impl Sync for PythonUsageIndex
impl Unpin for PythonUsageIndex
impl UnsafeUnpin for PythonUsageIndex
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
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> ⓘ
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