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 PythonUsageIndexwhere
*const u8 is !null: Freeze,
PhantomData<(String, Vec<ProjectFile>)>: Freeze,
*const ArcInner<PythonModuleSpellings> is !null: Freeze,
PhantomData<ArcInner<PythonModuleSpellings>>: Freeze,
PhantomData<(ProjectFile, Arc<ExportIndex>)>: Freeze,
PhantomData<((ProjectFile, String), Vec<(ProjectFile, String)>)>: Freeze,
PhantomData<(ProjectFile, Vec<ProjectFile>)>: Freeze,
PhantomData<(ProjectFile, Vec<ImportEdge>)>: Freeze,
impl Move for PythonUsageIndex
impl Send for PythonUsageIndexwhere
RawTable<(String, Vec<ProjectFile>)>: Send,
Arc<PythonModuleSpellings>: Send,
RawTable<(ProjectFile, Arc<ExportIndex>)>: Send,
RawTable<((ProjectFile, String), Vec<(ProjectFile, String)>)>: Send,
RawTable<(ProjectFile, Vec<ProjectFile>)>: Send,
RawTable<(ProjectFile, Vec<ImportEdge>)>: Send,
impl Sync for PythonUsageIndexwhere
RawTable<(String, Vec<ProjectFile>)>: Sync,
Arc<PythonModuleSpellings>: Sync,
RawTable<(ProjectFile, Arc<ExportIndex>)>: Sync,
RawTable<((ProjectFile, String), Vec<(ProjectFile, String)>)>: Sync,
RawTable<(ProjectFile, Vec<ProjectFile>)>: Sync,
RawTable<(ProjectFile, Vec<ImportEdge>)>: Sync,
impl Unpin for PythonUsageIndex
impl UnsafeUnpin for PythonUsageIndexwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<(String, Vec<ProjectFile>)>: UnsafeUnpin,
*const ArcInner<PythonModuleSpellings> is !null: UnsafeUnpin,
PhantomData<ArcInner<PythonModuleSpellings>>: UnsafeUnpin,
PhantomData<(ProjectFile, Arc<ExportIndex>)>: UnsafeUnpin,
PhantomData<((ProjectFile, String), Vec<(ProjectFile, String)>)>: UnsafeUnpin,
PhantomData<(ProjectFile, Vec<ProjectFile>)>: UnsafeUnpin,
PhantomData<(ProjectFile, Vec<ImportEdge>)>: UnsafeUnpin,
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