Crate raur

source ·
Expand description

raur

raur is a library for interacting with the aurweb RPC Interface.

See also the Arch wiki page for more information.

Example


use raur::Raur;

let raur = raur::Handle::new();

// Use `search` to search using keywords (multiple strategies available)
let pkgs = raur.search("pacman").await?;
assert!(pkgs.len() > 10);

for pkg in pkgs {
    println!("{:<30}{}", pkg.name, pkg.version);
}

// Use `info` to get info about a list of packages. Not-found packages are silently ignored.
let pkgs = raur.info(&["spotify", "discord-ptb"]).await?;
assert_eq!(pkgs.len(), 2);

for pkg in pkgs {
    println!("{:<30}{}", pkg.name, pkg.version);
}

Structs

A wrapper around raur::Package. Adds the traits necessary to store in a hash set and look them up by pkgname.
A handle for making AUR requests.
The package info that a query will return.

Enums

The error type for raur.
What field to search by.

Statics

The default URL used for the AUR.

Traits

The main trait for RPC functionality.

Type Definitions

A common cache type for users of this library. Libraries that make use of the AUR RPC should take in a cache, make sure to check the cache before making RPC requests. On cache misses, the library should make an RPC request and place the new packages into the cache for others to use.