pub struct CodeFeatures {
pub ast_depth: u32,
pub num_operators: u32,
pub num_control_flow: u32,
pub cyclomatic_complexity: f32,
pub num_type_coercions: u32,
pub uses_edge_values: bool,
}Expand description
Features extracted from source code for ML
Fields§
§ast_depth: u32AST depth
num_operators: u32Number of operators
num_control_flow: u32Number of control flow statements
cyclomatic_complexity: f32Cyclomatic complexity
num_type_coercions: u32Number of type coercions
uses_edge_values: boolUses edge values (0, -1, MAX_INT, etc.)
Trait Implementations§
Source§impl Clone for CodeFeatures
impl Clone for CodeFeatures
Source§fn clone(&self) -> CodeFeatures
fn clone(&self) -> CodeFeatures
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 CodeFeatures
impl Debug for CodeFeatures
Source§impl Default for CodeFeatures
impl Default for CodeFeatures
Source§fn default() -> CodeFeatures
fn default() -> CodeFeatures
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CodeFeatures
impl<'de> Deserialize<'de> for CodeFeatures
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 CodeFeatures
impl RefUnwindSafe for CodeFeatures
impl Send for CodeFeatures
impl Sync for CodeFeatures
impl Unpin for CodeFeatures
impl UnsafeUnpin for CodeFeatures
impl UnwindSafe for CodeFeatures
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