#[non_exhaustive]pub struct ReviewAction { /* private fields */ }Expand description
What GitHubApi::pr_review submits (gh pr review).
The fields are private so the invariant holds by construction: gh
requires a body for request-changes/comment reviews, so those are only
reachable through request_changes /
comment, which both take the body — an empty-body
request-changes is unrepresentable. Approve’s body is optional
(approve starts with none; attach one with
with_body). Read the parts back via
kind / body.
Implementations§
Source§impl ReviewAction
impl ReviewAction
Sourcepub fn request_changes(body: impl Into<String>) -> Self
pub fn request_changes(body: impl Into<String>) -> Self
Request changes; gh requires the body
(--request-changes --body <body>).
Sourcepub fn comment(body: impl Into<String>) -> Self
pub fn comment(body: impl Into<String>) -> Self
A comment-only review; gh requires the body (--comment --body <body>).
Sourcepub fn with_body(self, body: impl Into<String>) -> Self
pub fn with_body(self, body: impl Into<String>) -> Self
Attach or replace the body — mainly to give an approve
a message.
Sourcepub fn kind(&self) -> ReviewKind
pub fn kind(&self) -> ReviewKind
Which kind of review this is.
Trait Implementations§
Source§impl Clone for ReviewAction
impl Clone for ReviewAction
Source§fn clone(&self) -> ReviewAction
fn clone(&self) -> ReviewAction
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 ReviewAction
impl Debug for ReviewAction
impl Eq for ReviewAction
Source§impl PartialEq for ReviewAction
impl PartialEq for ReviewAction
Source§fn eq(&self, other: &ReviewAction) -> bool
fn eq(&self, other: &ReviewAction) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ReviewAction
Auto Trait Implementations§
impl Freeze for ReviewAction
impl RefUnwindSafe for ReviewAction
impl Send for ReviewAction
impl Sync for ReviewAction
impl Unpin for ReviewAction
impl UnsafeUnpin for ReviewAction
impl UnwindSafe for ReviewAction
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