pub struct StackFrame {
pub id: i64,
pub name: String,
pub source: Option<Source>,
pub line: i64,
pub column: i64,
pub end_line: Option<i64>,
pub end_column: Option<i64>,
pub can_restart: Option<bool>,
pub presentation_hint: Option<StackFramePresentationHint>,
pub module_id: Option<String>,
}Expand description
Represents a stack frame in the call stack.
This struct follows the DAP specification for stack frames and includes all necessary information for debugger navigation.
Fields§
§id: i64Unique identifier for this frame within the debug session
name: StringThe name of the frame (typically the function name)
source: Option<Source>The source file associated with this frame
line: i64The 1-based line number in the source file
column: i64The 1-based column number (defaults to 1)
end_line: Option<i64>The optional end line (for multi-line frames)
end_column: Option<i64>The optional end column
can_restart: Option<bool>Whether the frame can be restarted
presentation_hint: Option<StackFramePresentationHint>Presentation hint for UI rendering
module_id: Option<String>Module information
Implementations§
Source§impl StackFrame
impl StackFrame
Sourcepub fn new(
id: i64,
name: impl Into<String>,
source: Option<Source>,
line: i64,
) -> Self
pub fn new( id: i64, name: impl Into<String>, source: Option<Source>, line: i64, ) -> Self
Creates a new stack frame with the given ID, name, and location.
Sourcepub fn for_subroutine(
id: i64,
package: &str,
sub_name: &str,
file: &str,
line: i64,
) -> Self
pub fn for_subroutine( id: i64, package: &str, sub_name: &str, file: &str, line: i64, ) -> Self
Creates a stack frame for a Perl subroutine.
Sourcepub fn with_column(self, column: i64) -> Self
pub fn with_column(self, column: i64) -> Self
Sets the column for this frame.
Sourcepub fn with_end(self, end_line: i64, end_column: i64) -> Self
pub fn with_end(self, end_line: i64, end_column: i64) -> Self
Sets the end position for this frame.
Sourcepub fn with_presentation_hint(self, hint: StackFramePresentationHint) -> Self
pub fn with_presentation_hint(self, hint: StackFramePresentationHint) -> Self
Sets the presentation hint for this frame.
Sourcepub fn with_module(self, module_id: impl Into<String>) -> Self
pub fn with_module(self, module_id: impl Into<String>) -> Self
Sets the module ID for this frame.
Sourcepub fn qualified_name(&self) -> &str
pub fn qualified_name(&self) -> &str
Returns the full qualified name of this frame.
Sourcepub fn is_user_code(&self) -> bool
pub fn is_user_code(&self) -> bool
Returns true if this frame represents user code (not library/core).
Trait Implementations§
Source§impl Clone for StackFrame
impl Clone for StackFrame
Source§fn clone(&self) -> StackFrame
fn clone(&self) -> StackFrame
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more