pub struct Bug(/* private fields */);Expand description
The core bug entry.
Implementations§
Source§impl Bug
impl Bug
pub fn get<'a>(&self, client: &'a dyn Client) -> Result<BugFull, Error>
pub fn get_wadl<'a>(&self, client: &'a dyn Client) -> Result<Resource, Error>
pub fn put<'a>( &self, client: &'a dyn Client, representation: &BugFull, ) -> Result<(), Error>
pub fn patch<'a>( &self, client: &'a dyn Client, representation: &BugDiff, ) -> Result<(), Error>
Sourcepub fn can_be_nominated_for<'a>(
&self,
client: &'a dyn Client,
target: &BugTarget,
) -> Result<(), Error>
pub fn can_be_nominated_for<'a>( &self, client: &'a dyn Client, target: &BugTarget, ) -> Result<(), Error>
Sourcepub fn get_nomination_for<'a>(
&self,
client: &'a dyn Client,
target: &BugTarget,
) -> Result<BugNominationFull, Error>
pub fn get_nomination_for<'a>( &self, client: &'a dyn Client, target: &BugTarget, ) -> Result<BugNominationFull, Error>
Return the IBugNomination for the target.
If no nomination is found, a NotFoundError is raised.
§Arguments
target: Target
Sourcepub fn get_nominations<'a>(
&self,
client: &'a dyn Client,
target: Option<&BugTarget>,
nominations: Option<&str>,
) -> Result<PagedCollection<'a, BugNominationPage>, Error>
pub fn get_nominations<'a>( &self, client: &'a dyn Client, target: Option<&BugTarget>, nominations: Option<&str>, ) -> Result<PagedCollection<'a, BugNominationPage>, Error>
Return a list of all IBugNominations for this bug.
The list is ordered by IBugNominations.target.bugtargetdisplayname.
§Arguments
target: Targetnominations: Nominations to search through.
Sourcepub fn is_expirable<'a>(
&self,
client: &'a dyn Client,
days_old: Option<&str>,
) -> Result<(), Error>
pub fn is_expirable<'a>( &self, client: &'a dyn Client, days_old: Option<&str>, ) -> Result<(), Error>
Is this bug eligible for expiration and was it last updated more than X days ago?
If days_old is None the default number of days without activity is used.
Returns True or False.
§Arguments
days_old: Number of days of inactivity for which to check.
Sourcepub fn get_visible_linked_branches<'a>(
&self,
client: &'a dyn Client,
) -> Result<(), Error>
pub fn get_visible_linked_branches<'a>( &self, client: &'a dyn Client, ) -> Result<(), Error>
Return all the branches linked to the bug that user can see.
§Arguments
Sourcepub fn link_branch<'a>(
&self,
client: &'a dyn Client,
branch: &Branch,
) -> Result<(), Error>
pub fn link_branch<'a>( &self, client: &'a dyn Client, branch: &Branch, ) -> Result<(), Error>
Sourcepub fn unlink_branch<'a>(
&self,
client: &'a dyn Client,
branch: &Branch,
) -> Result<(), Error>
pub fn unlink_branch<'a>( &self, client: &'a dyn Client, branch: &Branch, ) -> Result<(), Error>
Sourcepub fn add_nomination<'a>(
&self,
client: &'a dyn Client,
target: &BugTarget,
) -> Result<Option<BugNomination>, Error>
pub fn add_nomination<'a>( &self, client: &'a dyn Client, target: &BugTarget, ) -> Result<Option<BugNomination>, Error>
Nominate a bug for an IDistroSeries or IProductSeries.
This method creates and returns a BugNomination. (See lp.bugs.model.bugnomination.BugNomination.)
§Arguments
target: Target
Sourcepub fn add_task<'a>(
&self,
client: &'a dyn Client,
target: &BugTarget,
) -> Result<Option<BugTask>, Error>
pub fn add_task<'a>( &self, client: &'a dyn Client, target: &BugTarget, ) -> Result<Option<BugTask>, Error>
Create a new bug task on this bug.
§Arguments
-
target: TargetThe software in which this bug should be fixed.
Sourcepub fn add_attachment<'a>(
&self,
client: &'a dyn Client,
data: Option<Part>,
comment: &str,
filename: Option<&str>,
url: Option<&Url>,
is_patch: Option<&bool>,
content_type: Option<&str>,
description: Option<&str>,
) -> Result<Option<BugAttachment>, Error>
pub fn add_attachment<'a>( &self, client: &'a dyn Client, data: Option<Part>, comment: &str, filename: Option<&str>, url: Option<&Url>, is_patch: Option<&bool>, content_type: Option<&str>, description: Option<&str>, ) -> Result<Option<BugAttachment>, Error>
Attach a file to this bug.
§Arguments
data: A file-like object, or a bytes.comment: An IMessage or string.filename: A string.url: External URL of the attachmentis_patch: A boolean.content_typedescription: A brief description of the attachment.
Sourcepub fn add_watch<'a>(
&self,
client: &'a dyn Client,
bug_tracker: &BugTracker,
remote_bug: &str,
) -> Result<Option<BugWatch>, Error>
pub fn add_watch<'a>( &self, client: &'a dyn Client, bug_tracker: &BugTracker, remote_bug: &str, ) -> Result<Option<BugWatch>, Error>
Create a new watch for this bug on the given remote bug and bug tracker, owned by the person given as the owner.
§Arguments
-
bug_tracker: Bug SystemYou can register new bug trackers from the Launchpad Bugs home page.
-
remote_bug: Remote BugThe bug number of this bug in the remote bug tracker.
Sourcepub fn mark_user_affected<'a>(
&self,
client: &'a dyn Client,
affected: Option<&bool>,
) -> Result<(), Error>
pub fn mark_user_affected<'a>( &self, client: &'a dyn Client, affected: Option<&bool>, ) -> Result<(), Error>
Sourcepub fn set_comment_visibility<'a>(
&self,
client: &'a dyn Client,
comment_number: &str,
visible: &bool,
) -> Result<(), Error>
pub fn set_comment_visibility<'a>( &self, client: &'a dyn Client, comment_number: &str, visible: &bool, ) -> Result<(), Error>
Set the visible attribute on a bug comment. This is restricted to Launchpad admins, and will return a HTTP Error 401: Unauthorized error for non-admin callers.
§Arguments
comment_number: The number of the comment in the list of messages.visible: Show this comment?
Sourcepub fn new_message<'a>(
&self,
client: &'a dyn Client,
subject: Option<&str>,
content: &str,
send_notifications: Option<&bool>,
) -> Result<Option<Message>, Error>
pub fn new_message<'a>( &self, client: &'a dyn Client, subject: Option<&str>, content: &str, send_notifications: Option<&bool>, ) -> Result<Option<Message>, Error>
Create a new message, and link it to this object.
§Arguments
subject: Subjectcontent: Messagesend_notifications: Enable email notifications for adding this comment.