pub struct BuildQuery<'a> { /* private fields */ }Expand description
data type encapsulating parameters for querying Builds
use bodhi::{BuildQuery, ContentType, FedoraRelease};
let query = BuildQuery::new();
// let builds = bodhi.paginated_request(&query).unwrap();API documentation: https://bodhi.fedoraproject.org/docs/server_api/rest/builds.html#service-1
Implementations§
Source§impl<'a> BuildQuery<'a>
impl<'a> BuildQuery<'a>
Sourcepub fn new() -> Self
pub fn new() -> Self
constructor for BuildQuery without any filters
Sourcepub fn rows_per_page(self, rows_per_page: u32) -> Self
pub fn rows_per_page(self, rows_per_page: u32) -> Self
override the default number of results per page
Sourcepub fn callback(self, fun: impl Fn(u32, u32) + 'a) -> Self
pub fn callback(self, fun: impl Fn(u32, u32) + 'a) -> Self
add callback function for progress reporting during long-running queries
The specified function will be called with the current result page and the number of total pages as arguments.
Sourcepub fn nvr(self, nvr: &'a str) -> Self
pub fn nvr(self, nvr: &'a str) -> Self
restrict query to builds matching a specific NVR
If this is the only parameter, consider using a BuildNVRQuery instead.
Sourcepub fn packages(self, packages: &'a [&'a str]) -> Self
pub fn packages(self, packages: &'a [&'a str]) -> Self
restrict query to builds matching specific packages
Sourcepub fn releases(self, releases: &'a [FedoraRelease]) -> Self
pub fn releases(self, releases: &'a [FedoraRelease]) -> Self
restrict query to builds matching specific releases
Trait Implementations§
Source§impl<'a> Debug for BuildQuery<'a>
impl<'a> Debug for BuildQuery<'a>
Source§impl<'a> Default for BuildQuery<'a>
impl<'a> Default for BuildQuery<'a>
Source§fn default() -> BuildQuery<'a>
fn default() -> BuildQuery<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for BuildQuery<'a>
impl<'a> !Send for BuildQuery<'a>
impl<'a> !Sync for BuildQuery<'a>
impl<'a> !UnwindSafe for BuildQuery<'a>
impl<'a> Freeze for BuildQuery<'a>
impl<'a> Unpin for BuildQuery<'a>
impl<'a> UnsafeUnpin for BuildQuery<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more