pub struct ReviewInfo {
pub rule: Rule,
pub status: ReviewStatus,
pub started_at: DateTime<Utc>,
pub completed_at: Option<DateTime<Utc>>,
pub reviewer: Option<String>,
pub comments: Vec<ReviewComment>,
pub comparison: Option<RuleComparison>,
pub review_score: Option<f32>,
}Expand description
Complete review information for a rule
Fields§
§rule: RuleRule being reviewed
status: ReviewStatusCurrent review status
started_at: DateTime<Utc>When the review was started
completed_at: Option<DateTime<Utc>>When the review was completed
reviewer: Option<String>Reviewer name
comments: Vec<ReviewComment>Review comments
comparison: Option<RuleComparison>Comparison with previous version
review_score: Option<f32>Overall review score (0.0 to 1.0)
Implementations§
Source§impl ReviewInfo
impl ReviewInfo
Sourcepub fn add_comment(&mut self, comment: ReviewComment)
pub fn add_comment(&mut self, comment: ReviewComment)
Add a comment to the review
Sourcepub fn set_comparison(&mut self, comparison: RuleComparison)
pub fn set_comparison(&mut self, comparison: RuleComparison)
Set the comparison
Sourcepub fn request_revision(&mut self, reviewer: String)
pub fn request_revision(&mut self, reviewer: String)
Mark as needing revision
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if review is complete
Sourcepub fn get_critical_comments(&self) -> Vec<&ReviewComment>
pub fn get_critical_comments(&self) -> Vec<&ReviewComment>
Get critical comments
Sourcepub fn get_comments(&self) -> &[ReviewComment]
pub fn get_comments(&self) -> &[ReviewComment]
Get all comments
Sourcepub fn comment_count(&self) -> usize
pub fn comment_count(&self) -> usize
Get comment count
Sourcepub fn critical_comment_count(&self) -> usize
pub fn critical_comment_count(&self) -> usize
Get critical comment count
Trait Implementations§
Source§impl Clone for ReviewInfo
impl Clone for ReviewInfo
Source§fn clone(&self) -> ReviewInfo
fn clone(&self) -> ReviewInfo
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 ReviewInfo
impl Debug for ReviewInfo
Source§impl<'de> Deserialize<'de> for ReviewInfo
impl<'de> Deserialize<'de> for ReviewInfo
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 ReviewInfo
impl RefUnwindSafe for ReviewInfo
impl Send for ReviewInfo
impl Sync for ReviewInfo
impl Unpin for ReviewInfo
impl UnwindSafe for ReviewInfo
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