Struct v8::StackFrame

source ·
#[repr(C)]
pub struct StackFrame(/* private fields */);
Expand description

A single JavaScript stack frame.

Implementations§

source§

impl StackFrame

source

pub fn get_line_number(&self) -> usize

Returns the number, 1-based, of the line for the associated function call. This method will return Message::kNoLineNumberInfo if it is unable to retrieve the line number, or if kLineNumber was not passed as an option when capturing the StackTrace.

source

pub fn get_column(&self) -> usize

Returns the 1-based column offset on the line for the associated function call. This method will return Message::kNoColumnInfo if it is unable to retrieve the column number, or if kColumnOffset was not passed as an option when capturing the StackTrace.

source

pub fn get_script_id(&self) -> usize

Returns the id of the script for the function for this StackFrame. This method will return Message::kNoScriptIdInfo if it is unable to retrieve the script id, or if kScriptId was not passed as an option when capturing the StackTrace.

source

pub fn get_script_name<'s>( &self, scope: &mut HandleScope<'s> ) -> Option<Local<'s, String>>

Returns the name of the resource that contains the script for the function for this StackFrame.

source

pub fn get_script_name_or_source_url<'s>( &self, scope: &mut HandleScope<'s> ) -> Option<Local<'s, String>>

Returns the name of the resource that contains the script for the function for this StackFrame or sourceURL value if the script name is undefined and its source ends with //# sourceURL=… string or deprecated //@ sourceURL=… string.

source

pub fn get_function_name<'s>( &self, scope: &mut HandleScope<'s> ) -> Option<Local<'s, String>>

Returns the name of the function associated with this stack frame.

source

pub fn is_eval(&self) -> bool

Returns whether or not the associated function is compiled via a call to eval().

source

pub fn is_constructor(&self) -> bool

Returns whether or not the associated function is called as a constructor via “new”.

source

pub fn is_wasm(&self) -> bool

Returns whether or not the associated functions is defined in wasm.

source

pub fn is_user_javascript(&self) -> bool

Returns whether or not the associated function is defined by the user.

Trait Implementations§

source§

impl Debug for StackFrame

source§

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

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

impl<'s> PartialEq for StackFrame

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq 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> 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, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.