pub enum QualityGrade {
APlus,
A,
AMinus,
BPlus,
B,
C,
D,
F,
}Expand description
Quality grade levels based on score percentages
Variants§
APlus
A+ (95-100% of max score)
A
A (90-94%)
AMinus
A- (85-89%) - PMAT minimum for production
BPlus
B+ (80-84%)
B
B (70-79%)
C
C (60-69%)
D
D (50-59%)
F
F (0-49%)
Implementations§
Source§impl QualityGrade
impl QualityGrade
Sourcepub fn from_rust_project_score(score: u32) -> Self
pub fn from_rust_project_score(score: u32) -> Self
Calculate grade from Rust project score (max 114)
Sourcepub fn from_repo_score(score: u32) -> Self
pub fn from_repo_score(score: u32) -> Self
Calculate grade from repository score (max 110)
Sourcepub fn from_readme_score(score: u32) -> Self
pub fn from_readme_score(score: u32) -> Self
Calculate grade from README score (max 20)
Sourcepub fn is_release_ready(&self) -> bool
pub fn is_release_ready(&self) -> bool
Check if grade is release-ready (A- or better)
Trait Implementations§
Source§impl Clone for QualityGrade
impl Clone for QualityGrade
Source§fn clone(&self) -> QualityGrade
fn clone(&self) -> QualityGrade
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QualityGrade
impl Debug for QualityGrade
Source§impl<'de> Deserialize<'de> for QualityGrade
impl<'de> Deserialize<'de> for QualityGrade
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 Display for QualityGrade
impl Display for QualityGrade
Source§impl Hash for QualityGrade
impl Hash for QualityGrade
Source§impl Ord for QualityGrade
impl Ord for QualityGrade
Source§impl PartialEq for QualityGrade
impl PartialEq for QualityGrade
Source§impl PartialOrd for QualityGrade
impl PartialOrd for QualityGrade
Source§impl Serialize for QualityGrade
impl Serialize for QualityGrade
impl Copy for QualityGrade
impl Eq for QualityGrade
impl StructuralPartialEq for QualityGrade
Auto Trait Implementations§
impl Freeze for QualityGrade
impl RefUnwindSafe for QualityGrade
impl Send for QualityGrade
impl Sync for QualityGrade
impl Unpin for QualityGrade
impl UnwindSafe for QualityGrade
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read moreSource§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.