Bug

Struct Bug 

Source
pub struct Bug(/* private fields */);
Expand description

The core bug entry.

Implementations§

Source§

impl Bug

Source

pub fn get<'a>(&self, client: &'a dyn Client) -> Result<BugFull, Error>

Source

pub fn get_wadl<'a>(&self, client: &'a dyn Client) -> Result<Resource, Error>

Source

pub fn put<'a>( &self, client: &'a dyn Client, representation: &BugFull, ) -> Result<(), Error>

Source

pub fn patch<'a>( &self, client: &'a dyn Client, representation: &BugDiff, ) -> Result<(), Error>

Source

pub fn can_be_nominated_for<'a>( &self, client: &'a dyn Client, target: &BugTarget, ) -> Result<(), Error>

Can this bug nominated for this target?

Returns True or False.

§Arguments
  • target: Target
Source

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
Source

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: Target
  • nominations: Nominations to search through.
Source

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.
Source

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

Associate a branch with this bug.

§Arguments
  • branch: The branch being linked to.

Unlink a branch from this bug.

§Arguments
  • branch: The branch being unlinked from.
Source

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
Source

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: Target

    The software in which this bug should be fixed.

Ensure that this CVE is linked to this bug.

§Arguments
  • cve: CVE

Ensure that any links between this bug and the given CVE are removed.

§Arguments
  • cve: CVE
Source

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 attachment
  • is_patch: A boolean.
  • content_type
  • description: A brief description of the attachment.
Source

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 System

    You can register new bug trackers from the Launchpad Bugs home page.

  • remote_bug: Remote Bug

    The bug number of this bug in the remote bug tracker.

Source

pub fn mark_user_affected<'a>( &self, client: &'a dyn Client, affected: Option<&bool>, ) -> Result<(), Error>

Mark :user: as affected by this bug.

§Arguments
  • affected: Does this bug affect you?
Source

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?
Source

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: Subject
  • content: Message
  • send_notifications: Enable email notifications for adding this comment.
Source

pub fn subscribe<'a>( &self, client: &'a dyn Client, person: &Person, level: Option<&Level>, ) -> Result<(), Error>

Subscribe person to the bug.

§Arguments
  • person: Person
  • level: Level
Source

pub fn unsubscribe<'a>( &self, client: &'a dyn Client, person: Option<&Person>, ) -> Result<(), Error>

Remove this person’s subscription to this bug.

§Arguments
  • person: Person
Source

pub fn unsubscribe_from_dupes<'a>( &self, client: &'a dyn Client, person: Option<&Person>, ) -> Result<(), Error>

Remove this person’s subscription from all dupes of this bug.

§Arguments
  • person: Person
Source

pub fn is_user_affected<'a>(&self, client: &'a dyn Client) -> Result<(), Error>

Is :user: marked as affected by this bug?

§Arguments

Trait Implementations§

Source§

impl Resource for Bug

Source§

fn url(&self) -> &Url

The URL of the resource

Auto Trait Implementations§

§

impl Freeze for Bug

§

impl RefUnwindSafe for Bug

§

impl Send for Bug

§

impl Sync for Bug

§

impl Unpin for Bug

§

impl UnwindSafe for Bug

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more