[][src]Struct bodhi::query::packages::PackageQuery

pub struct PackageQuery<'a> { /* fields omitted */ }

Use this for querying bodhi about a set of packages with the given properties, which can be specified with the builder pattern. Note that some options can be specified multiple times, and packages will be returned if any criteria match. This is consistent with both the web interface and REST API behavior.

let bodhi = BodhiServiceBuilder::default().build().unwrap();

let packages = bodhi.query(PackageQuery::new().search("rust*")).unwrap();

API documentation: https://bodhi.fedoraproject.org/docs/server_api/rest/packages.html#service-0

Methods

impl<'a> PackageQuery<'a>[src]

pub fn new() -> Self[src]

This method returns a new PackageQuery with no filters set.

pub fn callback(self, fun: impl Fn(u32, u32) + 'a) -> Self[src]

Add a callback function for reporting back query progress for long-running queries. The function will be called with the current page and the total number of pages for paginated queries.

pub fn like(self, like: &'a str) -> Self[src]

Restrict search to packages like the given argument (in the SQL sense).

pub fn name(self, name: &'a str) -> Self[src]

Restrict the returned results to packages matching the given name.

pub fn search(self, search: &'a str) -> Self[src]

Restrict search to packages containing the given argument.

Trait Implementations

impl<'a> Debug for PackageQuery<'a>[src]

impl<'a> Default for PackageQuery<'a>[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for PackageQuery<'a>

impl<'a> !Send for PackageQuery<'a>

impl<'a> !Sync for PackageQuery<'a>

impl<'a> Unpin for PackageQuery<'a>

impl<'a> !UnwindSafe for PackageQuery<'a>

Blanket Implementations

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

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

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

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.