Struct gitlab::types::Issue[][src]

pub struct Issue {
Show fields pub id: IssueId, pub iid: IssueInternalId, pub project_id: ProjectId, pub title: String, pub description: Option<String>, pub state: IssueState, pub created_at: DateTime<Utc>, pub updated_at: DateTime<Utc>, pub closed_at: Option<DateTime<Utc>>, pub closed_by: Option<UserBasic>, pub labels: Vec<String>, pub milestone: Option<Milestone>, pub author: UserBasic, pub assignee: Option<UserBasic>, pub assignees: Option<Vec<UserBasic>>, pub subscribed: Option<bool>, pub time_stats: IssuableTimeStats, pub user_notes_count: u64, pub merge_requests_count: u64, pub upvotes: u64, pub downvotes: u64, pub due_date: Option<NaiveDate>, pub has_tasks: Option<bool>, pub confidential: bool, pub discussion_locked: Option<bool>, pub web_url: String, // some fields omitted
}

An issue on a project.

Fields

id: IssueId

The ID of the issue.

iid: IssueInternalId

The user-visible ID of the issue.

project_id: ProjectId

The ID of the project.

title: String

The title of the issue.

description: Option<String>

The description of the issue.

state: IssueState

The state of the issue.

created_at: DateTime<Utc>

When the issue was created.

updated_at: DateTime<Utc>

When the issue was last updated.

closed_at: Option<DateTime<Utc>>

When the issue was closed, if closed.

closed_by: Option<UserBasic>

The user that closed the issue.

labels: Vec<String>

The labels attached to the issue.

milestone: Option<Milestone>

The milestone of the issue.

author: UserBasic

The author of the issue.

assignee: Option<UserBasic>

The assignee of the issue.

assignees: Option<Vec<UserBasic>>

The assignees of the issue.

subscribed: Option<bool>

Whether the current user is subscribed or not. GitLab does not include this in responses with lists of issues but does on an individual issue.

time_stats: IssuableTimeStats

Time estimates.

user_notes_count: u64

The number of comments on the issue.

merge_requests_count: u64

The number of merge requests referencing the issue.

upvotes: u64

The number of upvotes for the issue.

downvotes: u64

The number of downvotes against the issue.

due_date: Option<NaiveDate>

When the issue is due.

has_tasks: Option<bool>

Whether the issue is has a non-empty task list. GitLab does not include this in issue references.

confidential: bool

Whether the issue is confidential or not.

discussion_locked: Option<bool>

Whether the discussion has been locked.

web_url: String

The URL of the issue.

Implementations

impl Issue[src]

pub fn new(project_id: ProjectId, title: String, author: UserBasic) -> Issue[src]

Creates a new blank issue: it needs at least the ProjectId, title and author ProjectId and author are mandatory in the Issue struct itself title is mandatory for the new issue API of Gitlab

pub fn with_iid(self, iid: IssueInternalId) -> Issue[src]

Complements the issue with optional parameter: iid

pub fn with_description(self, description: String) -> Issue[src]

Complements the issue with optional parameter: description

pub fn with_confidential(self, confidential: bool) -> Issue[src]

Complements the issue with optional parameter: confidential

pub fn with_assignees(self, assignees: Vec<UserBasic>) -> Issue[src]

Complements the issue with optional parameter: assignees

pub fn with_milestone(self, milestone: Milestone) -> Issue[src]

Complements the issue with optional parameter: milestone

pub fn with_labels(self, labels: Vec<String>) -> Issue[src]

Complements the issue with optional parameter: labels

pub fn with_created_at(self, created_at: DateTime<Utc>) -> Issue[src]

Complements the issue with optional parameter: created_at

pub fn with_due_date(self, due_date: NaiveDate) -> Issue[src]

Complements the issue with optional parameter: due_date

Trait Implementations

impl Clone for Issue[src]

fn clone(&self) -> Issue[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Issue[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<'de> Deserialize<'de> for Issue[src]

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
    __D: Deserializer<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

impl Serialize for Issue[src]

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
    __S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

impl RefUnwindSafe for Issue

impl Send for Issue

impl Sync for Issue

impl Unpin for Issue

impl UnwindSafe for Issue

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

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

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

fn in_current_span(self) -> Instrumented<Self>[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

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

Performs the conversion.

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.

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

Performs the conversion.

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]