Crate aur_rpc

Crate aur_rpc 

Source
Expand description

§aur-rpc

This crate offers abstractions over the rpcs provided by the Arch Linux User Repository (AUR).

§Usage

#[tokio::main]
pub async fn main() {
    let packages = aur_rpc::search("yay").await.unwrap();

    for package in packages {
        println!("{} - {:?}", package.name, package.maintainer);
    }
     
    let mut infos = aur_rpc::info(["mediarepo"]).await.unwrap();
    let info = infos.pop().expect("package not found");
    println!("{}", info.metadata.popularity);
}

Modules§

error

Structs§

PackageInfo
Represents the information about a package that can be retrieved with the info rpc
PackageMetadata
Represents the basic information about a package that can be retrieved from a search or by fetching the package info.

Enums§

SearchField
Represents a field to search by

Functions§

info
Returns information about the given list of packages
search
Searches for packages by name
search_by
Searches for packages by a specific field