pub trait PythonUsageSource: PythonSource {
// Required methods
fn usage_index(&self) -> Arc<PythonUsageIndex> ⓘ;
fn module_binding_timeline(
&self,
file: &ProjectFile,
build: &mut dyn FnMut() -> ModuleBindingTimeline,
) -> Arc<ModuleBindingTimeline> ⓘ;
fn scope_facts(
&self,
file: &ProjectFile,
build: &mut dyn FnMut() -> Option<PythonScopeFacts>,
) -> Option<Arc<PythonScopeFacts>>;
fn usage_index_with_cancellation(
&self,
cancellation: &CancellationToken,
) -> Option<Arc<PythonUsageIndex>>;
}Expand description
PythonSource plus the built usage index. Everything reached from
the export/importer walks needs it; the index build itself must not.
Required Methods§
fn usage_index(&self) -> Arc<PythonUsageIndex> ⓘ
fn module_binding_timeline( &self, file: &ProjectFile, build: &mut dyn FnMut() -> ModuleBindingTimeline, ) -> Arc<ModuleBindingTimeline> ⓘ
fn scope_facts( &self, file: &ProjectFile, build: &mut dyn FnMut() -> Option<PythonScopeFacts>, ) -> Option<Arc<PythonScopeFacts>>
Sourcefn usage_index_with_cancellation(
&self,
cancellation: &CancellationToken,
) -> Option<Arc<PythonUsageIndex>>
fn usage_index_with_cancellation( &self, cancellation: &CancellationToken, ) -> Option<Arc<PythonUsageIndex>>
A cancelled initialization publishes no partial index.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".