pub trait AnalysisEngine {
// Required methods
fn create_memory_analysis(
&self,
allocations: &[AllocationInfo],
) -> Result<AnalysisData, AnalysisError>;
fn create_lifetime_analysis(
&self,
allocations: &[AllocationInfo],
) -> Result<AnalysisData, AnalysisError>;
fn create_performance_analysis(
&self,
allocations: &[AllocationInfo],
) -> Result<AnalysisData, AnalysisError>;
fn create_unsafe_ffi_analysis(
&self,
allocations: &[AllocationInfo],
) -> Result<AnalysisData, AnalysisError>;
fn create_complex_types_analysis(
&self,
allocations: &[AllocationInfo],
) -> Result<AnalysisData, AnalysisError>;
fn get_config(&self) -> &AnalysisConfig;
}
Expand description
Unified analysis engine trait for consistent data processing
This trait ensures that all export formats (JSON, binary, etc.) use the same analysis logic, preventing data inconsistencies between different export methods.
Required Methods§
Sourcefn create_memory_analysis(
&self,
allocations: &[AllocationInfo],
) -> Result<AnalysisData, AnalysisError>
fn create_memory_analysis( &self, allocations: &[AllocationInfo], ) -> Result<AnalysisData, AnalysisError>
Create memory analysis data
Analyzes memory allocation patterns, sizes, and basic statistics
Sourcefn create_lifetime_analysis(
&self,
allocations: &[AllocationInfo],
) -> Result<AnalysisData, AnalysisError>
fn create_lifetime_analysis( &self, allocations: &[AllocationInfo], ) -> Result<AnalysisData, AnalysisError>
Create lifetime analysis data
Analyzes allocation lifetimes, scope information, and lifecycle events
Sourcefn create_performance_analysis(
&self,
allocations: &[AllocationInfo],
) -> Result<AnalysisData, AnalysisError>
fn create_performance_analysis( &self, allocations: &[AllocationInfo], ) -> Result<AnalysisData, AnalysisError>
Create performance analysis data
Analyzes performance metrics, allocation patterns, and optimization opportunities
Sourcefn create_unsafe_ffi_analysis(
&self,
allocations: &[AllocationInfo],
) -> Result<AnalysisData, AnalysisError>
fn create_unsafe_ffi_analysis( &self, allocations: &[AllocationInfo], ) -> Result<AnalysisData, AnalysisError>
Create unsafe FFI analysis data
Analyzes unsafe operations, FFI boundaries, and potential safety violations
Sourcefn create_complex_types_analysis(
&self,
allocations: &[AllocationInfo],
) -> Result<AnalysisData, AnalysisError>
fn create_complex_types_analysis( &self, allocations: &[AllocationInfo], ) -> Result<AnalysisData, AnalysisError>
Create complex types analysis data
Analyzes complex type usage, generic instantiations, and type relationships
Sourcefn get_config(&self) -> &AnalysisConfig
fn get_config(&self) -> &AnalysisConfig
Get analysis engine configuration