pub struct BzInstance {
pub host: String,
pub auth: Auth,
pub pagination: Pagination,
pub included_fields: Vec<String>,
/* private fields */
}Expand description
Configuration and credentials to access a Bugzilla instance.
Fields§
§host: String§auth: Auth§pagination: Pagination§included_fields: Vec<String>Implementations§
Source§impl BzInstance
impl BzInstance
Sourcepub fn at(host: String) -> Result<Self, BugzillaQueryError>
pub fn at(host: String) -> Result<Self, BugzillaQueryError>
Create a new BzInstance struct using a host URL, with default values
for all options.
Sourcepub fn authenticate(self, auth: Auth) -> Self
pub fn authenticate(self, auth: Auth) -> Self
Set the authentication method of this BzInstance.
Sourcepub fn paginate(self, pagination: Pagination) -> Self
pub fn paginate(self, pagination: Pagination) -> Self
Set the pagination method of this BzInstance.
Sourcepub fn include_fields(self, fields: Vec<String>) -> Self
pub fn include_fields(self, fields: Vec<String>) -> Self
Set Bugzilla fields that this BzInstance will request, such as flags.
By default, BzInstance requests the _default fields, and using this method
overwrites the default value. If you want to set fields in addition
to _default, specify _default in your list.
Sourcepub async fn bugs(&self, ids: &[&str]) -> Result<Vec<Bug>, BugzillaQueryError>
pub async fn bugs(&self, ids: &[&str]) -> Result<Vec<Bug>, BugzillaQueryError>
Access several bugs by their IDs.
Auto Trait Implementations§
impl Freeze for BzInstance
impl !RefUnwindSafe for BzInstance
impl Send for BzInstance
impl Sync for BzInstance
impl Unpin for BzInstance
impl !UnwindSafe for BzInstance
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