Struct alpm::Alpm
[−]
[src]
pub struct Alpm { /* fields omitted */ }
Methods
impl Alpm
[src]
fn new() -> Result<Alpm, Error>
Create a handle with the default dbpath or what is specified in PACMAN_CONF
fn with_dbpath(dbpath: String) -> Result<Alpm, Error>
Create a handle with a custom dbpath
fn query_package_version<S>(&self, query: S) -> Result<String> where
S: Into<String>,
S: Into<String>,
Query for the version of a package.
This will return version numbers like 4.7-2
or 5.0.1-4
or 1.10.0_patch1-1
It behaves like pacman -Q {query}
fn vercmp(&self, a: String, b: String) -> Result<Ordering>
Compare two version strings and determine which one is newer.
Returns [Ordering::Less
] if a is newer than b, [Ordering::Equal
] if a
and b are the same version, or [Ordering::Greater
] if b is newer than a.
Trait Implementations
impl Drop for Alpm
[src]
fn drop(&mut self)
Automatic cleanup