Skip to main content

StackFrame

Struct StackFrame 

Source
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: i64

Unique identifier for this frame within the debug session

§name: String

The name of the frame (typically the function name)

§source: Option<Source>

The source file associated with this frame

§line: i64

The 1-based line number in the source file

§column: i64

The 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

Source

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.

Source

pub fn for_subroutine( id: i64, package: &str, sub_name: &str, file: &str, line: i64, ) -> Self

Creates a stack frame for a Perl subroutine.

Source

pub fn with_column(self, column: i64) -> Self

Sets the column for this frame.

Source

pub fn with_end(self, end_line: i64, end_column: i64) -> Self

Sets the end position for this frame.

Source

pub fn with_presentation_hint(self, hint: StackFramePresentationHint) -> Self

Sets the presentation hint for this frame.

Source

pub fn with_module(self, module_id: impl Into<String>) -> Self

Sets the module ID for this frame.

Source

pub fn qualified_name(&self) -> &str

Returns the full qualified name of this frame.

Source

pub fn file_path(&self) -> Option<&str>

Returns the file path if available.

Source

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

Source§

fn clone(&self) -> StackFrame

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StackFrame

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for StackFrame

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for StackFrame

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for StackFrame

Source§

fn eq(&self, other: &StackFrame) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for StackFrame

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for StackFrame

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,