pub struct FeatureExtractor { /* private fields */ }Expand description
Extracts OwnershipFeatures from HIR functions.
DECY-ML-002: Converts HIR analysis into 142-dimension feature vectors for ML-based ownership classification.
Implementations§
Source§impl FeatureExtractor
impl FeatureExtractor
Sourcepub fn extracted_count(&self) -> u64
pub fn extracted_count(&self) -> u64
Get count of features extracted.
Sourcepub fn extract_for_parameter(
&self,
func: &HirFunction,
param_name: &str,
) -> Option<OwnershipFeatures>
pub fn extract_for_parameter( &self, func: &HirFunction, param_name: &str, ) -> Option<OwnershipFeatures>
Extract features for a specific parameter by name.
Sourcepub fn extract_for_variable(
&self,
func: &HirFunction,
var_name: &str,
) -> Option<OwnershipFeatures>
pub fn extract_for_variable( &self, func: &HirFunction, var_name: &str, ) -> Option<OwnershipFeatures>
Extract features for a local variable by name.
Sourcepub fn extract_all(
&self,
func: &HirFunction,
) -> Vec<(String, OwnershipFeatures)>
pub fn extract_all( &self, func: &HirFunction, ) -> Vec<(String, OwnershipFeatures)>
Extract features for all pointer parameters in a function.
Trait Implementations§
Source§impl Debug for FeatureExtractor
impl Debug for FeatureExtractor
Source§impl Default for FeatureExtractor
impl Default for FeatureExtractor
Source§fn default() -> FeatureExtractor
fn default() -> FeatureExtractor
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FeatureExtractor
impl RefUnwindSafe for FeatureExtractor
impl Send for FeatureExtractor
impl Sync for FeatureExtractor
impl Unpin for FeatureExtractor
impl UnwindSafe for FeatureExtractor
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