pub struct PythonEnvironmentLifecycle<R = SystemUvRunner> { /* private fields */ }Expand description
Composes metadata discovery, planning, and materialization for provider files.
Implementations§
Source§impl PythonEnvironmentLifecycle<SystemUvRunner>
impl PythonEnvironmentLifecycle<SystemUvRunner>
pub fn new(uv_program: impl Into<PathBuf>, spec: PythonEnvironmentSpec) -> Self
Source§impl<R: UvRunner> PythonEnvironmentLifecycle<R>
impl<R: UvRunner> PythonEnvironmentLifecycle<R>
pub fn with_runner( uv_program: impl Into<PathBuf>, spec: PythonEnvironmentSpec, runner: R, ) -> Self
Sourcepub fn prepare_provider(
&self,
provider_path: &Path,
) -> Result<PreparedPythonEnvironment, PythonEnvironmentLifecycleError>
pub fn prepare_provider( &self, provider_path: &Path, ) -> Result<PreparedPythonEnvironment, PythonEnvironmentLifecycleError>
Prepares the immutable environment for provider_path.
Metadata parsing happens directly from source and never imports provider code. A complete content-addressed cache is reopened without invoking uv.
Sourcepub fn validate_provider_candidate(
&self,
provider_path: &Path,
candidate: &PreparedPythonEnvironment,
) -> Result<PreparedPythonEnvironment, PythonEnvironmentLifecycleError>
pub fn validate_provider_candidate( &self, provider_path: &Path, candidate: &PreparedPythonEnvironment, ) -> Result<PreparedPythonEnvironment, PythonEnvironmentLifecycleError>
Resolves dependencies into a new immutable candidate generation.
The current prepared environment is never replaced or activated here.
pub fn update_provider( &self, provider_path: &Path, ) -> Result<PythonEnvironmentUpdateReport, PythonEnvironmentLifecycleError>
Sourcepub fn repair_provider(
&self,
provider_path: &Path,
) -> Result<PythonEnvironmentRepairReport, PythonEnvironmentLifecycleError>
pub fn repair_provider( &self, provider_path: &Path, ) -> Result<PythonEnvironmentRepairReport, PythonEnvironmentLifecycleError>
Verifies or rebuilds the exact immutable environment planned for one provider.
Repair never imports provider code and restores the quarantined cache entry when a rebuild fails.
Auto Trait Implementations§
impl<R> Freeze for PythonEnvironmentLifecycle<R>where
R: Freeze,
impl<R> RefUnwindSafe for PythonEnvironmentLifecycle<R>where
R: RefUnwindSafe,
impl<R> Send for PythonEnvironmentLifecycle<R>where
R: Send,
impl<R> Sync for PythonEnvironmentLifecycle<R>where
R: Sync,
impl<R> Unpin for PythonEnvironmentLifecycle<R>where
R: Unpin,
impl<R> UnsafeUnpin for PythonEnvironmentLifecycle<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for PythonEnvironmentLifecycle<R>where
R: UnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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