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§
Sourcefn prepare(&self, provider_path: &Path) -> Result<PythonInterpreter, String>
fn prepare(&self, provider_path: &Path) -> Result<PythonInterpreter, String>
Returns the interpreter selected for provider_path after preparing its environment.
Sourcefn validate_candidate(
&self,
provider_path: &Path,
candidate: &PreparedPythonEnvironment,
) -> Result<PythonInterpreter, String>
fn validate_candidate( &self, provider_path: &Path, candidate: &PreparedPythonEnvironment, ) -> Result<PythonInterpreter, String>
Revalidates an immutable candidate against the current provider source and cache.