[][src]Struct bodhi::query::users::UserQuery

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

Use this for querying bodhi about a set of users with the given properties, which can be specified with the builder pattern. Note that some options can be specified multiple times, and users 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 users = bodhi.query(UserQuery::new().groups("provenpackager")).unwrap();

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

Methods

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

pub fn new() -> Self[src]

This method returns a new UserQuery 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 groups(self, group: &'a str) -> Self[src]

Restrict the returned results to members of the given group(s).

Can be specified multiple times.

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

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

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

Restrict results to users with the given username.

If this is the only required filter, consider using a UserNameQuery instead.

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

Restrict search to users containing the given argument.

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

Restrict the returned results to users associated with the given update(s).

Can be specified multiple times.

Trait Implementations

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

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

Auto Trait Implementations

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

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

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

impl<'a> Unpin for UserQuery<'a>

impl<'a> !UnwindSafe for UserQuery<'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.