Skip to main content

check_analysis_depth

Function check_analysis_depth 

Source
pub fn check_analysis_depth(current_depth: usize) -> PatternsResult<()>
Expand description

Check if analysis depth limit has been exceeded.

Uses saturating arithmetic to prevent overflow.

§Arguments

  • current_depth - The current analysis depth

§Returns

Ok(()) if within limits, error otherwise.

§Errors

  • PatternsError::DepthLimitExceeded if depth >= MAX_ANALYSIS_DEPTH