Skip to main content

FrameClassifier

Trait FrameClassifier 

Source
pub trait FrameClassifier {
    // Required method
    fn classify(&self, frame: &StackFrame) -> FrameCategory;

    // Provided methods
    fn apply_classification(&self, frame: StackFrame) -> StackFrame { ... }
    fn classify_all(
        &self,
        frames: Vec<StackFrame>,
        include_external: bool,
    ) -> Vec<StackFrame> { ... }
}
Expand description

Trait for classifying stack frames.

Implementations determine whether a stack frame represents user code, library code, or core Perl internals.

Required Methods§

Source

fn classify(&self, frame: &StackFrame) -> FrameCategory

Classifies a stack frame.

§Arguments
  • frame - The frame to classify
§Returns

The classification category for the frame.

Provided Methods§

Source

fn apply_classification(&self, frame: StackFrame) -> StackFrame

Applies classification to a frame, setting its presentation hint.

§Arguments
  • frame - The frame to classify and update
§Returns

The frame with updated presentation hint.

Source

fn classify_all( &self, frames: Vec<StackFrame>, include_external: bool, ) -> Vec<StackFrame>

Classifies and filters a list of frames.

§Arguments
  • frames - The frames to classify
  • include_external - Whether to include library/core frames
§Returns

Classified frames with appropriate presentation hints.

Implementors§