pub trait Raur {
type Err;
fn raw_info<'life0, 'life1, 'async_trait, S>(
&'life0 self,
pkg_names: &'life1 [S]
) -> Pin<Box<dyn Future<Output = Result<Vec<Package>, Self::Err>> + Send + 'async_trait>>
where
S: 'async_trait + AsRef<str> + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn search_by<'life0, 'async_trait, S>(
&'life0 self,
query: S,
strategy: SearchBy
) -> Pin<Box<dyn Future<Output = Result<Vec<Package>, Self::Err>> + Send + 'async_trait>>
where
S: 'async_trait + AsRef<str> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait;
fn info<'life0, 'life1, 'async_trait, S>(
&'life0 self,
pkg_names: &'life1 [S]
) -> Pin<Box<dyn Future<Output = Result<Vec<Package>, Self::Err>> + Send + 'async_trait>>
where
S: 'async_trait + AsRef<str> + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
{ ... }
fn cache_info<'life0, 'life1, 'life2, 'async_trait, S>(
&'life0 self,
cache: &'life1 mut Cache,
pkgs: &'life2 [S]
) -> Pin<Box<dyn Future<Output = Result<Vec<ArcPackage>, Self::Err>> + Send + 'async_trait>>
where
S: 'async_trait + AsRef<str> + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: Sync + 'async_trait,
{ ... }
fn search<'life0, 'async_trait, S>(
&'life0 self,
query: S
) -> Pin<Box<dyn Future<Output = Result<Vec<Package>, Self::Err>> + Send + 'async_trait>>
where
S: 'async_trait + AsRef<str> + Send + Sync,
'life0: 'async_trait,
Self: Sync + 'async_trait,
{ ... }
fn orphans<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<Package>, Self::Err>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: Sync + 'async_trait,
{ ... }
}
Expand description
The main trait for RPC functionality.
This trait is implemented by Handle
, which is what you should use at run-time.
You can also use the mock implementation of this trait in e.g. tests.
The trait itself is implemented using [async-trait
].
Required Associated Types§
Required Methods§
sourcefn raw_info<'life0, 'life1, 'async_trait, S>(
&'life0 self,
pkg_names: &'life1 [S]
) -> Pin<Box<dyn Future<Output = Result<Vec<Package>, Self::Err>> + Send + 'async_trait>>where
S: 'async_trait + AsRef<str> + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn raw_info<'life0, 'life1, 'async_trait, S>(
&'life0 self,
pkg_names: &'life1 [S]
) -> Pin<Box<dyn Future<Output = Result<Vec<Package>, Self::Err>> + Send + 'async_trait>>where
S: 'async_trait + AsRef<str> + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Performs an AUR info request.
You probably want to use info
instead.
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.
sourcefn search_by<'life0, 'async_trait, S>(
&'life0 self,
query: S,
strategy: SearchBy
) -> Pin<Box<dyn Future<Output = Result<Vec<Package>, Self::Err>> + Send + 'async_trait>>where
S: 'async_trait + AsRef<str> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
fn search_by<'life0, 'async_trait, S>(
&'life0 self,
query: S,
strategy: SearchBy
) -> Pin<Box<dyn Future<Output = Result<Vec<Package>, Self::Err>> + Send + 'async_trait>>where
S: 'async_trait + AsRef<str> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
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 include:
- Dependency types
- Licences
- Groups
See SearchBy
for how packages are matched.
Provided Methods§
sourcefn info<'life0, 'life1, 'async_trait, S>(
&'life0 self,
pkg_names: &'life1 [S]
) -> Pin<Box<dyn Future<Output = Result<Vec<Package>, Self::Err>> + Send + 'async_trait>>where
S: 'async_trait + AsRef<str> + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
fn info<'life0, 'life1, 'async_trait, S>(
&'life0 self,
pkg_names: &'life1 [S]
) -> Pin<Box<dyn Future<Output = Result<Vec<Package>, Self::Err>> + Send + 'async_trait>>where
S: 'async_trait + AsRef<str> + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
Performs an AUR info request, splitting requests as needed.
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.
sourcefn cache_info<'life0, 'life1, 'life2, 'async_trait, S>(
&'life0 self,
cache: &'life1 mut Cache,
pkgs: &'life2 [S]
) -> Pin<Box<dyn Future<Output = Result<Vec<ArcPackage>, Self::Err>> + Send + 'async_trait>>where
S: 'async_trait + AsRef<str> + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: Sync + 'async_trait,
fn cache_info<'life0, 'life1, 'life2, 'async_trait, S>(
&'life0 self,
cache: &'life1 mut Cache,
pkgs: &'life2 [S]
) -> Pin<Box<dyn Future<Output = Result<Vec<ArcPackage>, Self::Err>> + Send + 'async_trait>>where
S: 'async_trait + AsRef<str> + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: Sync + 'async_trait,
Perform an info request, storing the results into cache. Requests are not made for packages already in cache. If all packages are already in cache then no network request will be made.
The packages requested will be returned back (even if they were already in cache). Packages that could not be found will be missing from the return.
sourcefn search<'life0, 'async_trait, S>(
&'life0 self,
query: S
) -> Pin<Box<dyn Future<Output = Result<Vec<Package>, Self::Err>> + Send + 'async_trait>>where
S: 'async_trait + AsRef<str> + Send + Sync,
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn search<'life0, 'async_trait, S>(
&'life0 self,
query: S
) -> Pin<Box<dyn Future<Output = Result<Vec<Package>, Self::Err>> + Send + 'async_trait>>where
S: 'async_trait + AsRef<str> + Send + Sync,
'life0: 'async_trait,
Self: Sync + 'async_trait,
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).