pub struct GitHubIssueApiResponse {
pub number: u64,
pub title: String,
pub body: Option<String>,
pub state: State,
pub labels: Vec<GitHubLabelApiResponse>,
pub user: GitHubUser,
pub assignees: Vec<GitHubUser>,
pub created_at: String,
pub updated_at: String,
pub html_url: String,
}Expand description
GitHub API Issue 响应结构(REST 形状)。
用于解析 gh api repos/{owner}/{repo}/issues/{number} -X PATCH 的返回数据。
与 gh issue view --json 的 GraphQL 导出格式不同,REST 形状是 GitHub API
的稳定契约,不随 gh CLI 版本漂移:bot 用户同样携带数字 id,
也不存在 GraphQL 导出层新增/省略字段的问题(issue #117)。
Fields§
§number: u64§title: String§body: Option<String>§state: State§labels: Vec<GitHubLabelApiResponse>§user: GitHubUser§assignees: Vec<GitHubUser>§created_at: String§updated_at: String§html_url: StringTrait Implementations§
Source§impl Clone for GitHubIssueApiResponse
impl Clone for GitHubIssueApiResponse
Source§fn clone(&self) -> GitHubIssueApiResponse
fn clone(&self) -> GitHubIssueApiResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GitHubIssueApiResponse
impl Debug for GitHubIssueApiResponse
Source§impl<'de> Deserialize<'de> for GitHubIssueApiResponse
impl<'de> Deserialize<'de> for GitHubIssueApiResponse
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
Source§impl From<GitHubIssueApiResponse> for IssueData
impl From<GitHubIssueApiResponse> for IssueData
Source§fn from(api: GitHubIssueApiResponse) -> Self
fn from(api: GitHubIssueApiResponse) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for GitHubIssueApiResponse
impl RefUnwindSafe for GitHubIssueApiResponse
impl Send for GitHubIssueApiResponse
impl Sync for GitHubIssueApiResponse
impl Unpin for GitHubIssueApiResponse
impl UnsafeUnpin for GitHubIssueApiResponse
impl UnwindSafe for GitHubIssueApiResponse
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more