pub struct Package {
pub name: String,
}Expand description
A Python package identifier
Fields§
§name: StringNormalized package name
Implementations§
Trait Implementations§
Source§impl DependencyProvider<Package, Version> for PyPIProvider
impl DependencyProvider<Package, Version> for PyPIProvider
Source§fn choose_package_version<T: Borrow<Package>, U: Borrow<Range<Version>>>(
&self,
potential_packages: impl Iterator<Item = (T, U)>,
) -> Result<(T, Option<Version>), Box<dyn StdError>>
fn choose_package_version<T: Borrow<Package>, U: Borrow<Range<Version>>>( &self, potential_packages: impl Iterator<Item = (T, U)>, ) -> Result<(T, Option<Version>), Box<dyn StdError>>
Decision making
is the process of choosing the next package
and version that will be appended to the partial solution.
Every time such a decision must be made,
potential valid packages and version ranges are preselected by the resolver,
and the dependency provider must choose. Read more
Source§fn get_dependencies(
&self,
package: &Package,
version: &Version,
) -> Result<Dependencies<Package, Version>, Box<dyn StdError>>
fn get_dependencies( &self, package: &Package, version: &Version, ) -> Result<Dependencies<Package, Version>, Box<dyn StdError>>
Retrieves the package dependencies.
Return Dependencies::Unknown if its dependencies are unknown.
Source§fn should_cancel(&self) -> Result<(), Box<dyn Error>>
fn should_cancel(&self) -> Result<(), Box<dyn Error>>
This is called fairly regularly during the resolution,
if it returns an Err then resolution will be terminated.
This is helpful if you want to add some form of early termination like a timeout,
or you want to add some form of user feedback if things are taking a while.
If not provided the resolver will run as long as needed.
Source§impl<'de> Deserialize<'de> for Package
impl<'de> Deserialize<'de> for Package
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Package
impl Ord for Package
Source§impl PartialOrd for Package
impl PartialOrd for Package
impl Eq for Package
impl StructuralPartialEq for Package
Auto Trait Implementations§
impl Freeze for Package
impl RefUnwindSafe for Package
impl Send for Package
impl Sync for Package
impl Unpin for Package
impl UnwindSafe for Package
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.