Crate raur[][src]

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-canary"]).await?;
assert_eq!(pkgs.len(), 2);

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

Structs

ArcPackage

A wrapper around raur::Package. Adds the traits necessary to store in a hash set and look them up by pkgname.

Handle

A handle for making AUR requests.

Package

The package info that a query will return.

Enums

Error

The error type for raur.

SearchBy

What field to search by.

Statics

AUR_URL

The default URL used for the AUR.

Traits

Raur

The main trait for RPC functionality.

Type Definitions

Cache

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.