[−][src]Trait raur::Raur
The trait for RPC functionality.
Handle
Implements this and can be used directly in user code. However is may be useful to
be Generic over this trait to allow for testing using mock implementors.
Associated Types
type Err
The error type that functions may return.
Required methods
fn info<S: AsRef<str>>(
&self,
pkg_names: &[S]
) -> Result<Vec<Package>, Self::Err>
&self,
pkg_names: &[S]
) -> Result<Vec<Package>, Self::Err>
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 Package
s 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.
fn search_by<S: AsRef<str>>(
&self,
query: S,
strategy: SearchBy
) -> Result<Vec<Package>, Self::Err>
&self,
query: S,
strategy: SearchBy
) -> Result<Vec<Package>, Self::Err>
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.
Provided methods
fn search<S: AsRef<str>>(&self, query: S) -> Result<Vec<Package>, Self::Err>
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).
fn orphans(&self) -> Result<Vec<Package>, Self::Err>
Returns a list of all orphan packages in the AUR.