Module closure_analysis

Source
Expand description

Closure capture analysis for memscope

This module provides detailed analysis of closure captures, including:

  • Variable capture modes (by value, by reference, by mutable reference)
  • Lifetime tracking of captured variables
  • Memory impact analysis of closures
  • Optimization suggestions for closure usage

Structs§

CaptureEvent
Capture event tracking
CaptureInfo
Information about a captured variable
CaptureStatistics
Capture statistics
ClosureAnalysisReport
Comprehensive closure analysis report
ClosureAnalyzer
Advanced closure capture analysis
ClosureFootprint
Closure memory footprint analysis
ClosureInfo
Information about a closure
CreationContext
Creation context for closures
DetectedClosure
Detected closure in allocation analysis
LifetimeAnalysis
Lifetime analysis results
LifetimeGraph
Lifetime relationship graph
LifetimeIssue
Lifetime-related issues
LifetimePattern
Lifetime patterns
LifetimeRelationship
Lifetime relationship between closure and captured variable
OptimizationPotential
Optimization potential analysis
OptimizationSuggestion
Optimization suggestions

Enums§

CaptureEventType
Types of capture events
CaptureMode
Modes of variable capture
ClosureType
Types of closures
IssueSeverity
Issue severity levels
LifetimeIssueType
Types of lifetime issues
LifetimePatternType
Types of lifetime patterns
MemoryImpact
Memory impact assessment
OptimizationCategory
Categories of optimizations
OptimizationLevel
Levels of optimization potential
PatternImpact
Impact of patterns
RelationshipType
Types of lifetime relationships
SuggestionPriority
Priority levels for suggestions

Functions§

get_global_closure_analyzer
Get the global closure analyzer instance