pub struct ReviewComments {
pub tool_total: [Option<u32>; 2],
pub comments: Vec<Suggestion>,
pub full_patch: [String; 2],
}
Expand description
A struct to describe the Pull Request review suggestions.
Fields§
§tool_total: [Option<u32>; 2]
The total count of suggestions from clang-tidy and clang-format.
This differs from comments.len()
because some suggestions may
not fit within the file’s diff.
comments: Vec<Suggestion>
A list of comment suggestions to be posted.
These suggestions are guaranteed to fit in the file’s diff.
full_patch: [String; 2]
The complete patch of changes to all files scanned.
This includes changes from both clang-tidy and clang-format (assembled in that order).
Implementations§
Source§impl ReviewComments
impl ReviewComments
pub fn summarize(&self, clang_versions: &ClangVersions) -> String
pub fn is_comment_in_suggestions(&mut self, comment: &Suggestion) -> bool
Trait Implementations§
Source§impl Default for ReviewComments
impl Default for ReviewComments
Source§fn default() -> ReviewComments
fn default() -> ReviewComments
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ReviewComments
impl RefUnwindSafe for ReviewComments
impl Send for ReviewComments
impl Sync for ReviewComments
impl Unpin for ReviewComments
impl UnwindSafe for ReviewComments
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> 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