#[non_exhaustive]pub struct PullRequest {
pub number: u64,
pub title: String,
pub state: String,
pub pull_request: Option<PullRequestRef>,
pub html_url: String,
pub repository_url: Option<String>,
}Expand description
A pull request as returned by the Search Issues endpoint
when filtering on type:pr. The Search API actually returns
“issue” objects with PR-specific fields populated, so we
shape this around the union of useful fields rather than the
fuller /repos/{owner}/{repo}/pulls/{number} model.
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.number: u64§title: String§state: String§pull_request: Option<PullRequestRef>Set when the PR has been merged. Some search responses omit this field for open PRs.
html_url: String§repository_url: Option<String>The repo this PR lives in — derived from html_url since
the search response doesn’t include a structured repo
object.
Implementations§
Trait Implementations§
Source§impl Clone for PullRequest
impl Clone for PullRequest
Source§impl Debug for PullRequest
impl Debug for PullRequest
Source§impl<'de> Deserialize<'de> for PullRequest
impl<'de> Deserialize<'de> for PullRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for PullRequest
impl Freeze for PullRequest
impl RefUnwindSafe for PullRequest
impl Send for PullRequest
impl Sync for PullRequest
impl Unpin for PullRequest
impl UnsafeUnpin for PullRequest
impl UnwindSafe for PullRequest
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