pub struct ReviewComment {
pub file_path: PathBuf,
pub line: u32,
pub severity: Severity,
pub message: String,
pub confidence: f64,
pub suggestion: Option<String>,
pub patch: Option<String>,
pub rule: Option<String>,
}Expand description
A single review comment produced by the AI reviewer.
§Examples
use argus_core::{ReviewComment, Severity};
use std::path::PathBuf;
let comment = ReviewComment {
file_path: PathBuf::from("src/auth.rs"),
line: 42,
severity: Severity::Bug,
message: "Possible null dereference".into(),
confidence: 95.0,
suggestion: Some("Add a None check".into()),
patch: None,
rule: None,
};
assert_eq!(comment.severity, Severity::Bug);Fields§
§file_path: PathBufPath to the file being commented on.
line: u32Line number in the new version of the file.
severity: SeveritySeverity of the finding.
message: StringExplanation of the issue.
confidence: f64LLM self-rated confidence (0–100).
suggestion: Option<String>Optional fix suggestion.
patch: Option<String>Optional code snippet showing the corrected code.
rule: Option<String>Custom rule name that matched this comment, if any.
Trait Implementations§
Source§impl Clone for ReviewComment
impl Clone for ReviewComment
Source§fn clone(&self) -> ReviewComment
fn clone(&self) -> ReviewComment
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 ReviewComment
impl Debug for ReviewComment
Source§impl<'de> Deserialize<'de> for ReviewComment
impl<'de> Deserialize<'de> for ReviewComment
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
Auto Trait Implementations§
impl Freeze for ReviewComment
impl RefUnwindSafe for ReviewComment
impl Send for ReviewComment
impl Sync for ReviewComment
impl Unpin for ReviewComment
impl UnsafeUnpin for ReviewComment
impl UnwindSafe for ReviewComment
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