pub trait MakeSuggestions {
// Required methods
fn get_suggestion_help(&self, start_line: u32, end_line: u32) -> String;
fn get_tool_name(&self) -> String;
// Provided method
fn get_suggestions(
&self,
review_comments: &mut ReviewComments,
file_obj: &FileObj,
patch: &mut Patch<'_>,
summary_only: bool,
) -> Result<(), SuggestionError> { ... }
}Expand description
A trait for generating suggestions from a FileObj’s advice’s generated patched buffer.
Required Methods§
Sourcefn 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.
Sourcefn get_tool_name(&self) -> String
fn get_tool_name(&self) -> String
Get the tool’s name which generated the advice.
Provided Methods§
Sourcefn get_suggestions(
&self,
review_comments: &mut ReviewComments,
file_obj: &FileObj,
patch: &mut Patch<'_>,
summary_only: bool,
) -> Result<(), SuggestionError>
fn get_suggestions( &self, review_comments: &mut ReviewComments, file_obj: &FileObj, patch: &mut Patch<'_>, summary_only: bool, ) -> Result<(), SuggestionError>
Create a bunch of suggestions from a FileObj’s advice’s generated patched buffer.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".