aur
aur
is a package for interacting with the [Arch User Repository] RPC API.
It supports client trait implementations for both asynchronous hyper
and
synchronous reqwest
.
Installation
This library requires at least Rust 1.26.0.
Add the following to your Cargo.toml
:
[]
= "~0.1"
And the following to your main.rs
or lib.rs
:
extern crate aur;
There are two features: hyper-support
and reqwest-support
.
hyper-support
is enabled by default. To enable reqwest-support
, instead
depend on aur
like so:
[]
= false
= ["reqwest-support"]
= "~0.1"
Examples
Asynchronously request information for the rust-nightly
package:
extern crate aur;
extern crate hyper;
extern crate hyper_rustls;
extern crate tokio_core;
use AurRequester;
use Client;
use HttpsConnector;
let connector = new;
let client = builder.build;
let done = client.aur_search.map.map_err;
run;
Synchronously request information for the rust-nightly
package:
extern crate aur;
extern crate reqwest;
use AurRequester;
use Client;
let client = new;
let info = client.aur_info?;
match info.first
License
ISC.