pub struct MissingPythonDistribution {
pub distribution: String,
pub python_version: Option<i32>,
pub minimum_version: Option<String>,
}Expand description
Problem representing a missing Python package distribution.
This struct is used when a required Python package is not available, which may include version constraints.
Fields§
§distribution: StringThe name of the missing Python distribution.
python_version: Option<i32>The Python major version (e.g., 2 or 3) if specific.
minimum_version: Option<String>The minimum required version of the distribution if specified.
Implementations§
Source§impl MissingPythonDistribution
impl MissingPythonDistribution
Sourcepub fn from_requirement_str(
text: &str,
python_version: Option<i32>,
) -> MissingPythonDistribution
pub fn from_requirement_str( text: &str, python_version: Option<i32>, ) -> MissingPythonDistribution
Creates a MissingPythonDistribution from a PEP508 requirement string.
Parses a Python package requirement string (in PEP508 format) to extract the package name and version constraints.
§Arguments
text- The requirement string in PEP508 formatpython_version- Optional Python version to override detected version
§Returns
A new MissingPythonDistribution instance
Trait Implementations§
Source§impl Clone for MissingPythonDistribution
impl Clone for MissingPythonDistribution
Source§fn clone(&self) -> MissingPythonDistribution
fn clone(&self) -> MissingPythonDistribution
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MissingPythonDistribution
impl Debug for MissingPythonDistribution
Source§impl Display for MissingPythonDistribution
impl Display for MissingPythonDistribution
Source§impl Problem for MissingPythonDistribution
impl Problem for MissingPythonDistribution
Source§fn is_universal(&self) -> bool
fn is_universal(&self) -> bool
Is this problem universal, i.e. applicable to all build steps? Read more
Auto Trait Implementations§
impl Freeze for MissingPythonDistribution
impl RefUnwindSafe for MissingPythonDistribution
impl Send for MissingPythonDistribution
impl Sync for MissingPythonDistribution
impl Unpin for MissingPythonDistribution
impl UnsafeUnpin for MissingPythonDistribution
impl UnwindSafe for MissingPythonDistribution
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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