Merge pull request #2 from fries1234/checkdepends

Expose check_depends
pull/3/head
Julius Riegel 2 years ago committed by GitHub
commit d74f5feda3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
Cargo.lock generated

@ -4,7 +4,7 @@ version = 3
[[package]]
name = "aur-rpc"
version = "0.1.3"
version = "0.2.0"
dependencies = [
"reqwest",
"serde",

@ -37,6 +37,7 @@ pub struct PackageInfo {
pub depends: Vec<String>,
pub make_depends: Vec<String>,
pub opt_depends: Vec<String>,
pub check_depends: Vec<String>
}
impl From<PackageInfoRaw> for PackageInfo {
@ -63,11 +64,12 @@ impl From<PackageInfoRaw> for PackageInfo {
depends: info.depends,
opt_depends: info.opt_depends,
make_depends: info.make_depends,
check_depends: info.check_depends,
}
}
}
/// Full packge info with all fields as a workaround
/// Full package info with all fields as a workaround
/// as serde doesn't support aliases in flattened structs
#[derive(Clone, Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
@ -79,6 +81,8 @@ pub(crate) struct PackageInfoRaw {
#[serde(default)]
pub opt_depends: Vec<String>,
#[serde(default)]
pub check_depends: Vec<String>,
#[serde(default)]
pub make_depends: Vec<String>,
pub description: Option<String>,
pub first_submitted: u64,
@ -112,7 +116,7 @@ pub(crate) struct AURResponse<T> {
pub error: Option<String>,
}
/// Represents the type of aur response
/// Represents the type of AUR response
#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub(crate) enum ResponseType {

@ -30,13 +30,13 @@ pub enum SearchField {
NameDesc,
/// Searches by package maintainer
Maintainer,
/// Searches for packages that depend on the given keywods
/// Searches for packages that depend on the given keywords
Depends,
/// Searches for packages that require the given keywords to be build
MakeDepends,
/// Searches for packages that optionally depend on the given keywods
/// Searches for packages that optionally depend on the given keywords
OptDepends,
/// Searches for packages that require the given keywods to be present
/// Searches for packages that require the given keywords to be present
CheckDepends,
}

Loading…
Cancel
Save