Struct rpm::Dependency
source · pub struct Dependency {
pub name: String,
pub flags: DependencyFlags,
pub version: String,
}
Expand description
Description of a dependency as present in a RPM header record.
Fields§
§name: String
§flags: DependencyFlags
§version: String
Implementations§
source§impl Dependency
impl Dependency
sourcepub fn any(dep_name: impl Into<String>) -> Self
pub fn any(dep_name: impl Into<String>) -> Self
Create a dependency on any version of some package or file (or string in general).
sourcepub fn eq(dep_name: impl Into<String>, version: impl Into<String>) -> Self
pub fn eq(dep_name: impl Into<String>, version: impl Into<String>) -> Self
Create a dependency on an exact version of some package.
sourcepub fn less(dep_name: impl Into<String>, version: impl Into<String>) -> Self
pub fn less(dep_name: impl Into<String>, version: impl Into<String>) -> Self
Create a dependency on a version of some package less than the provided one.
sourcepub fn less_eq(dep_name: impl Into<String>, version: impl Into<String>) -> Self
pub fn less_eq(dep_name: impl Into<String>, version: impl Into<String>) -> Self
Create a dependency on a version of some package less than or equal to the provided one.
sourcepub fn greater(dep_name: impl Into<String>, version: impl Into<String>) -> Self
pub fn greater(dep_name: impl Into<String>, version: impl Into<String>) -> Self
Create a dependency on a version of some package greater than the provided one.
sourcepub fn greater_eq(
dep_name: impl Into<String>,
version: impl Into<String>,
) -> Self
pub fn greater_eq( dep_name: impl Into<String>, version: impl Into<String>, ) -> Self
Create a dependency on a version of some package greater than or equal to the provided one.
sourcepub fn rpmlib(dep_name: impl Into<String>, version: impl Into<String>) -> Self
pub fn rpmlib(dep_name: impl Into<String>, version: impl Into<String>) -> Self
Create a dependency on an rpm feature, required to install this package
sourcepub fn user(username: &str) -> Self
pub fn user(username: &str) -> Self
Create a new user dependency
If such a dependency is required, versions of RPM 4.19 and newer will automatically create the required users and groups using systemd sys.users.d.
sourcepub fn group(groupname: &str) -> Self
pub fn group(groupname: &str) -> Self
Create a new group dependency
If such a dependency is required, versions of RPM 4.19 and newer will automatically create the required users and groups using systemd sys.users.d.
sourcepub fn script_pre(dep_name: impl Into<String>) -> Self
pub fn script_pre(dep_name: impl Into<String>) -> Self
Create a dependency on a package or file required for a pre-install script.
sourcepub fn script_post(dep_name: impl Into<String>) -> Self
pub fn script_post(dep_name: impl Into<String>) -> Self
Create a dependency on a package or file required for a post-install script.
sourcepub fn script_preun(dep_name: impl Into<String>) -> Self
pub fn script_preun(dep_name: impl Into<String>) -> Self
Create a dependency on a package or file required for a pre-un-install script.
sourcepub fn script_postun(dep_name: impl Into<String>) -> Self
pub fn script_postun(dep_name: impl Into<String>) -> Self
Create a dependency on a package or file required for a post-un-install script.
Trait Implementations§
source§impl Debug for Dependency
impl Debug for Dependency
source§impl PartialEq for Dependency
impl PartialEq for Dependency
source§fn eq(&self, other: &Dependency) -> bool
fn eq(&self, other: &Dependency) -> bool
self
and other
values to be equal, and is used
by ==
.impl Eq for Dependency
impl StructuralPartialEq for Dependency
Auto Trait Implementations§
impl Freeze for Dependency
impl RefUnwindSafe for Dependency
impl Send for Dependency
impl Sync for Dependency
impl Unpin for Dependency
impl UnwindSafe for Dependency
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
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>
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>
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