[][src]Struct raur::Handle

pub struct Handle { /* fields omitted */ }

A handle for making AUR requests.

Methods

impl Handle[src]

pub fn with_client(self, cli: Client) -> Self[src]

Used to manually specify the client that should be used.

pub fn with_url(self, url: &str) -> Result<Self, UrlError>[src]

Used to manually specify a URL to be used. If not specified, aur.archlinux.org/rpc is used.

pub fn url(&self) -> Url[src]

Used to retrieve the internal URL. This just points to AUR_URL if you did not explicitly set it.

pub fn client(self) -> Client[src]

Used to retrieve the client stored inside the struct. This consumes the struct as duplication could be expensive.

pub fn info<S: AsRef<str>>(
    &self,
    pkg_names: &[S]
) -> Result<Vec<Package>, Error>
[src]

Performs an AUR info request.

This function sends an info request to the AUR RPC. This kind of request takes a list of package names and returns a list of AUR Packages who's name exactly matches the input.

Note: If a package being queried does not exist then it will be silently ignored and not appear in return value.

Note: The return value has no guaranteed order.

pub fn search_by<S: AsRef<str>>(
    &self,
    query: S,
    strategy: SearchBy
) -> Result<Vec<Package>, Error>
[src]

Performs an AUR search request.

This function sends a search request to the AUR RPC. This kind of request takes a single query and returns a list of matching packages.

Note: Unlike info, search results will never inclide:

  • Dependency types
  • Licence
  • Groups

See SearchBy for how packages are matched.

pub fn search<S: AsRef<str>>(&self, query: S) -> Result<Vec<Package>, Error>[src]

Performs an AUR search request by NameDesc.

This is the same as fn.search_by except it always searches by NameDesc (the default for the AUR).

pub fn orphans(&self) -> Result<Vec<Package>, Error>[src]

Returns a list of all orphan packages in the AUR.

Trait Implementations

impl Default for Handle[src]

Auto Trait Implementations

impl Send for Handle

impl Sync for Handle

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

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

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