Skip to main content

PythonProviderEnvironmentPreparer

Trait PythonProviderEnvironmentPreparer 

Source
pub trait PythonProviderEnvironmentPreparer: Send + Sync {
    // Required methods
    fn prepare(&self, provider_path: &Path) -> Result<PythonInterpreter, String>;
    fn validate_candidate(
        &self,
        provider_path: &Path,
        candidate: &PreparedPythonEnvironment,
    ) -> Result<PythonInterpreter, String>;
}
Expand description

Prepares an immutable Python environment before a provider candidate is imported for catalog discovery.

Required Methods§

Source

fn prepare(&self, provider_path: &Path) -> Result<PythonInterpreter, String>

Returns the interpreter selected for provider_path after preparing its environment.

Source

fn validate_candidate( &self, provider_path: &Path, candidate: &PreparedPythonEnvironment, ) -> Result<PythonInterpreter, String>

Revalidates an immutable candidate against the current provider source and cache.

Implementors§