Skip to main content

PullRequestDetails

Struct PullRequestDetails 

Source
#[non_exhaustive]
pub struct PullRequestDetails {
Show 13 fields pub key: String, pub title: String, pub url: String, pub status: PullRequestStatus, pub author: Option<String>, pub review: Option<ReviewStatus>, pub checks: Option<CheckStatus>, pub check_counts: Option<CheckCounts>, pub updated_at: Option<String>, pub head_ref: Option<String>, pub base_ref: Option<String>, pub additions: Option<u32>, pub deletions: Option<u32>,
}
Expand description

A short pull request summary, held only in memory for this account.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§key: String

The canonical owner/repository#number.

§title: String§url: String

The canonical pull request URL.

§status: PullRequestStatus§author: Option<String>

The author’s login.

§review: Option<ReviewStatus>§checks: Option<CheckStatus>§check_counts: Option<CheckCounts>

How many checks passed out of how many, beside checks; None when the responder has not read them.

§updated_at: Option<String>

When it last changed, as RFC 3339.

§head_ref: Option<String>§base_ref: Option<String>§additions: Option<u32>§deletions: Option<u32>

Implementations§

Source§

impl PullRequestDetails

Source

pub fn new(key: &str, title: &str, url: &str, status: PullRequestStatus) -> Self

Source

pub fn with_author(self, author: Option<&str>) -> Self

Source

pub fn with_review(self, review: Option<ReviewStatus>) -> Self

Source

pub fn with_checks(self, checks: Option<CheckStatus>) -> Self

Source

pub fn with_check_counts(self, counts: Option<CheckCounts>) -> Self

How many checks passed out of how many.

Source

pub fn with_updated_at(self, updated_at: Option<&str>) -> Self

Source

pub fn with_branches(self, head: Option<&str>, base: Option<&str>) -> Self

The head branch and the branch it merges into.

Source

pub fn with_changes( self, additions: Option<u32>, deletions: Option<u32>, ) -> Self

Lines added and deleted.

Trait Implementations§

Source§

impl Clone for PullRequestDetails

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Eq for PullRequestDetails

Source§

impl PartialEq for PullRequestDetails

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for PullRequestDetails

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.