pub struct CodeQualityFeatures {
pub loc: u32,
pub ast_depth: u32,
pub unique_identifiers: u32,
pub complexity: u32,
pub has_control_flow: bool,
pub has_functions: bool,
pub has_error_handling: bool,
pub comment_ratio: f32,
}Expand description
Features extracted from code for quality prediction
Fields§
§loc: u32Lines of code
ast_depth: u32AST depth
unique_identifiers: u32Number of unique identifiers
complexity: u32Cyclomatic complexity estimate
has_control_flow: boolHas control flow (if/for/while)
has_functions: boolHas function definitions
has_error_handling: boolHas error handling (try/except)
comment_ratio: f32Ratio of comments to code
Implementations§
Trait Implementations§
Source§impl Clone for CodeQualityFeatures
impl Clone for CodeQualityFeatures
Source§fn clone(&self) -> CodeQualityFeatures
fn clone(&self) -> CodeQualityFeatures
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 CodeQualityFeatures
impl Debug for CodeQualityFeatures
Source§impl Default for CodeQualityFeatures
impl Default for CodeQualityFeatures
Source§fn default() -> CodeQualityFeatures
fn default() -> CodeQualityFeatures
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CodeQualityFeatures
impl<'de> Deserialize<'de> for CodeQualityFeatures
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 PartialEq for CodeQualityFeatures
impl PartialEq for CodeQualityFeatures
Source§impl Serialize for CodeQualityFeatures
impl Serialize for CodeQualityFeatures
impl StructuralPartialEq for CodeQualityFeatures
Auto Trait Implementations§
impl Freeze for CodeQualityFeatures
impl RefUnwindSafe for CodeQualityFeatures
impl Send for CodeQualityFeatures
impl Sync for CodeQualityFeatures
impl Unpin for CodeQualityFeatures
impl UnsafeUnpin for CodeQualityFeatures
impl UnwindSafe for CodeQualityFeatures
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> 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 more