pub enum Grade {
F,
D,
CMinus,
C,
CPlus,
BMinus,
B,
BPlus,
AMinus,
A,
APlus,
}Expand description
Quality grade levels (A+ through F) per spec.
Variants§
F
Failing (0-49)
D
Incomplete (50-54)
CMinus
Sketch (55-59)
C
Draft (60-64)
CPlus
Prototype (65-69)
BMinus
Development (70-74)
B
Alpha Quality (75-79)
BPlus
Beta Quality (80-84)
AMinus
Release Candidate (85-89)
A
Production Ready (90-94)
APlus
Production Excellence (95-100)
Implementations§
Source§impl Grade
impl Grade
Sourcepub fn from_percentage(percent: f32) -> Self
pub fn from_percentage(percent: f32) -> Self
Create a grade from a percentage score (0-100 scale).
Sourcepub const fn min_percentage(&self) -> f32
pub const fn min_percentage(&self) -> f32
Get the minimum percentage for this grade.
Sourcepub const fn is_passing(&self) -> bool
pub const fn is_passing(&self) -> bool
Check if this is a passing grade (C or better = 60+).
Sourcepub const fn is_production_ready(&self) -> bool
pub const fn is_production_ready(&self) -> bool
Check if this grade is production ready (B+ or better = 80+).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Grade
impl<'de> Deserialize<'de> for Grade
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 Ord for Grade
impl Ord for Grade
Source§impl PartialOrd for Grade
impl PartialOrd for Grade
impl Copy for Grade
impl Eq for Grade
impl StructuralPartialEq for Grade
Auto Trait Implementations§
impl Freeze for Grade
impl RefUnwindSafe for Grade
impl Send for Grade
impl Sync for Grade
impl Unpin for Grade
impl UnwindSafe for Grade
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