Struct debian_packaging::dependency::SingleDependency
source · pub struct SingleDependency {
pub package: String,
pub version_constraint: Option<DependencyVersionConstraint>,
pub architectures: Option<(bool, Vec<String>)>,
}Expand description
A dependency of a package.
Fields§
§package: StringPackage the dependency is on.
version_constraint: Option<DependencyVersionConstraint>§architectures: Option<(bool, Vec<String>)>Implementations§
source§impl SingleDependency
impl SingleDependency
sourcepub fn parse(s: &str) -> Result<Self>
pub fn parse(s: &str) -> Result<Self>
Parse a single package dependency expression into a SingleDependency.
sourcepub fn package_satisfies(
&self,
package: &str,
version: &PackageVersion,
architecture: &str
) -> bool
pub fn package_satisfies( &self, package: &str, version: &PackageVersion, architecture: &str ) -> bool
Evaluate whether a package satisfies the requirements of this parsed expression.
This takes as arguments the low-level package components needed for checking.
sourcepub fn package_satisfies_virtual(
&self,
package: &str,
provides: Option<&DependencyVersionConstraint>
) -> bool
pub fn package_satisfies_virtual( &self, package: &str, provides: Option<&DependencyVersionConstraint> ) -> bool
Whether a package satisfies a virtual package constraint.
These are processed a bit differently in that architecture doesn’t come into play and version constraints in the source package are optional.
Trait Implementations§
source§impl Clone for SingleDependency
impl Clone for SingleDependency
source§fn clone(&self) -> SingleDependency
fn clone(&self) -> SingleDependency
Returns a copy of the value. Read more
1.0.0 · 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 SingleDependency
impl Debug for SingleDependency
source§impl Display for SingleDependency
impl Display for SingleDependency
source§impl PartialEq for SingleDependency
impl PartialEq for SingleDependency
source§fn eq(&self, other: &SingleDependency) -> bool
fn eq(&self, other: &SingleDependency) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for SingleDependency
Auto Trait Implementations§
impl RefUnwindSafe for SingleDependency
impl Send for SingleDependency
impl Sync for SingleDependency
impl Unpin for SingleDependency
impl UnwindSafe for SingleDependency
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