pub struct FormatAdvice {
pub replacements: Vec<Replacement>,
pub patched: Option<Vec<u8>>,
}
Expand description
A Structure used to deserialize clang-format’s XML output.
Fields§
§replacements: Vec<Replacement>
A list of Replacement
s that clang-tidy wants to make.
patched: Option<Vec<u8>>
Trait Implementations§
Source§impl Clone for FormatAdvice
impl Clone for FormatAdvice
Source§fn clone(&self) -> FormatAdvice
fn clone(&self) -> FormatAdvice
Returns a duplicate of the value. Read more
1.0.0 · 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 FormatAdvice
impl Debug for FormatAdvice
Source§impl<'de> Deserialize<'de> for FormatAdvice
impl<'de> Deserialize<'de> for FormatAdvice
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 MakeSuggestions for FormatAdvice
impl MakeSuggestions for FormatAdvice
Source§fn get_suggestion_help(&self, _start_line: u32, _end_line: u32) -> String
fn get_suggestion_help(&self, _start_line: u32, _end_line: u32) -> String
Create some user-facing helpful info about what the suggestion aims to resolve.
Source§fn get_tool_name(&self) -> String
fn get_tool_name(&self) -> String
Get the tool’s name which generated the advice.
Source§fn get_suggestions(
&self,
review_comments: &mut ReviewComments,
file_obj: &FileObj,
patch: &mut Patch<'_>,
summary_only: bool,
) -> Result<()>
fn get_suggestions( &self, review_comments: &mut ReviewComments, file_obj: &FileObj, patch: &mut Patch<'_>, summary_only: bool, ) -> Result<()>
Create a bunch of suggestions from a
FileObj
’s advice’s generated patched
buffer.Source§impl PartialEq for FormatAdvice
impl PartialEq for FormatAdvice
impl StructuralPartialEq for FormatAdvice
Auto Trait Implementations§
impl Freeze for FormatAdvice
impl RefUnwindSafe for FormatAdvice
impl Send for FormatAdvice
impl Sync for FormatAdvice
impl Unpin for FormatAdvice
impl UnwindSafe for FormatAdvice
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,
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