Request

Struct Request 

Source
pub struct Request {
    pub endpoint: String,
}
Expand description

This is a request to the AUR RPC

Fields§

§endpoint: String

URL of the AUR RPC endpoint. This is s assert_eq!(response.results[1].name, “yay-git”);t to the value of https://aur.archlinux.org/rpc/v5 by default; but for testing, or should there be some change this could prove useful.

Implementations§

Source§

impl Request

Source

pub async fn search_package_by_name( &self, package: &str, ) -> Result<ReturnData, Box<dyn Error>>

Package names are case insensitive. They can be searched by a few attributes: name, name-desc, depends, checkdepends, optdepends, makedepends, maintainer, submitter, provides, conflicts, replaces, keywords, groups, and comaintainers Search for package by package name.

Source

pub async fn search_package_by_name_desc( &self, package: &str, ) -> Result<ReturnData, Box<dyn Error>>

Search for package by package name and description.

Source

pub async fn search_package_by_depends( &self, package: &str, ) -> Result<ReturnData, Box<dyn Error>>

Search for package that depend on package.

Source

pub async fn search_package_by_checkdepends( &self, package: &str, ) -> Result<ReturnData, Box<dyn Error>>

Search for package that check depend on package.

Source

pub async fn search_package_by_optdepends( &self, package: &str, ) -> Result<ReturnData, Box<dyn Error>>

Search for package that optionally depend on package.

Source

pub async fn search_package_by_makedepends( &self, package: &str, ) -> Result<ReturnData, Box<dyn Error>>

Search for packages that need package to build.

Source

pub async fn search_package_by_maintainer( &self, package: &str, ) -> Result<ReturnData, Box<dyn Error>>

Search for package by package maintainer.

Source

pub async fn search_package_by_submitter( &self, package: &str, ) -> Result<ReturnData, Box<dyn Error>>

Search for package by package submitter.

Source

pub async fn search_package_by_provides( &self, package: &str, ) -> Result<ReturnData, Box<dyn Error>>

Search for packages that provide the same functionality.

Source

pub async fn search_package_by_conflicts( &self, package: &str, ) -> Result<ReturnData, Box<dyn Error>>

Search for packages that conflict with package.

Source

pub async fn search_package_by_replaces( &self, package: &str, ) -> Result<ReturnData, Box<dyn Error>>

Search for packages that this package replaces.

Source

pub async fn search_package_by_keywords( &self, package: &str, ) -> Result<ReturnData, Box<dyn Error>>

Search for packages by keywords.

Source

pub async fn search_package_by_groups( &self, package: &str, ) -> Result<ReturnData, Box<dyn Error>>

Search packages’ groups.

Source

pub async fn search_package_by_comaintainers( &self, package: &str, ) -> Result<ReturnData, Box<dyn Error>>

Search for packages by comaintainers.

Source

pub async fn search_info_by_name( &self, package: &str, ) -> Result<ReturnData, Box<dyn Error>>

Search for a packages’ info by name.

Source

pub async fn search_multi_info_by_names( &self, packages: &[&str], ) -> Result<ReturnData, Box<dyn Error>>

Search for information on multiple packages at once.

Source

pub async fn starts_with_name( &self, starts_with: &str, ) -> Result<Vec<String>, Box<dyn Error>>

Search for a package that starts with the given string. Note: Limited to 20 results.

Source

pub async fn starts_with_basename( &self, base_start: &str, ) -> Result<Vec<String>, Box<dyn Error>>

Search for a package base that starts with the given string. Note: Limited to 20 results.

Trait Implementations§

Source§

impl Debug for Request

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Request

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Request

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Request

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,