pub trait PythonUsageSource: PythonSource {
// Required methods
fn usage_index(&self) -> Arc<PythonUsageIndex> ⓘ;
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> ⓘ
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".