pub struct Provide {
pub name: String,
/* private fields */
}Expand description
This either represents a virtual package, or an actual package in a databse. It can be used to query a db.
Fields§
§name: StringImplementations§
Source§impl Provide
impl Provide
Sourcepub fn parse(data: impl AsRef<str>) -> Option<Provide>
pub fn parse(data: impl AsRef<str>) -> Option<Provide>
This will only return None if data == ""
Valid Provides are a package name, or a package name
and version, delimited by an equals sign (pacman=5.1.1),
or one of the comparison operators (as detailed on the
archwiki).
Sourcepub fn satisfies(&self, other: &Provide) -> bool
pub fn satisfies(&self, other: &Provide) -> bool
If the two Provides have the same name, and self.version() is
acceptable by the terms of the comp field of both provides.
pub fn version(&self) -> Option<Version<'_>>
Trait Implementations§
impl Eq for Provide
impl StructuralPartialEq for Provide
Auto Trait Implementations§
impl Freeze for Provide
impl RefUnwindSafe for Provide
impl Send for Provide
impl Sync for Provide
impl Unpin for Provide
impl UnwindSafe for Provide
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