[][src]Struct pkg_utils::Provide

pub struct Provide {
    pub name: String,
    // some fields omitted
}

This either represents a virtual package, or an actual package in a databse. It can be used to query a db.

Fields

name: String

Methods

impl Provide[src]

pub fn parse(data: impl AsRef<str>) -> Option<Provide>[src]

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).

pub fn satisfies(&self, other: &Provide) -> bool[src]

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>[src]

Trait Implementations

impl Eq for Provide[src]

impl Clone for Provide[src]

impl PartialEq<Provide> for Provide[src]

impl Hash for Provide[src]

impl Display for Provide[src]

impl Debug for Provide[src]

Auto Trait Implementations

impl Unpin for Provide

impl Sync for Provide

impl Send for Provide

impl UnwindSafe for Provide

impl RefUnwindSafe for Provide

Blanket Implementations

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]