pub struct ChecklistItem {
pub id: u8,
pub description: String,
pub passed: bool,
pub severity: Severity,
pub suggestion: Option<String>,
}Expand description
A scored quality check item from the 100-point checklist
Fields§
§id: u8Unique identifier (e.g., “1”, “25”, “53”)
description: StringCheck description
passed: boolPass/fail status
severity: SeveritySeverity level
suggestion: Option<String>Suggestion for improvement if failed
Implementations§
Source§impl ChecklistItem
impl ChecklistItem
Sourcepub fn new(
id: u8,
description: impl Into<String>,
severity: Severity,
passed: bool,
) -> Self
pub fn new( id: u8, description: impl Into<String>, severity: Severity, passed: bool, ) -> Self
Create a new checklist item
Sourcepub fn with_suggestion(self, suggestion: impl Into<String>) -> Self
pub fn with_suggestion(self, suggestion: impl Into<String>) -> Self
Add a suggestion for improvement
Sourcepub fn points_earned(&self) -> f64
pub fn points_earned(&self) -> f64
Get the points earned (0 if failed, severity points if passed)
Sourcepub fn max_points(&self) -> f64
pub fn max_points(&self) -> f64
Get the maximum possible points for this item
Trait Implementations§
Source§impl Clone for ChecklistItem
impl Clone for ChecklistItem
Source§fn clone(&self) -> ChecklistItem
fn clone(&self) -> ChecklistItem
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 moreAuto Trait Implementations§
impl Freeze for ChecklistItem
impl RefUnwindSafe for ChecklistItem
impl Send for ChecklistItem
impl Sync for ChecklistItem
impl Unpin for ChecklistItem
impl UnsafeUnpin for ChecklistItem
impl UnwindSafe for ChecklistItem
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 moreCreates a shared type from an unshared type.