Struct rant::runtime::CallStack [−][src]
pub struct CallStack<I> { /* fields omitted */ }
Represents a call stack and its associated locals.
Implementations
impl<I> CallStack<I>
[src]
impl<I> CallStack<I>
[src]pub fn is_empty(&self) -> bool
[src]
Returns true
if the stack is empty.
pub fn len(&self) -> usize
[src]
Gets the number of frames in the stack.
pub fn pop_frame(&mut self) -> Option<StackFrame<I>>
[src]
Removes the topmost frame from the stack and returns it.
pub fn push_frame(&mut self, frame: StackFrame<I>)
[src]
Adds a frame to the top of the stack.
pub fn top_mut(&mut self) -> Option<&mut StackFrame<I>>
[src]
Returns a mutable reference to the topmost frame in the stack.
pub fn parent_mut(&mut self, depth: usize) -> Option<&mut StackFrame<I>>
[src]
Returns a mutable reference to the frame depth
frames below the top of the stack.
pub fn parent(&self, depth: usize) -> Option<&StackFrame<I>>
[src]
Returns a reference to the frame depth
frames below the top of the stack.
pub fn top(&self) -> Option<&StackFrame<I>>
[src]
Returna reference to the topmost frame in the stack.
pub fn gen_stack_trace(&self) -> String
[src]
Generates a stack trace string from the current state of the stack.
pub fn set_var_value(
&mut self,
context: &mut Rant,
id: &str,
access: AccessPathKind,
val: RantValue
) -> RuntimeResult<()>
[src]
&mut self,
context: &mut Rant,
id: &str,
access: AccessPathKind,
val: RantValue
) -> RuntimeResult<()>
Sets a variable’s value using the specified access type.
pub fn get_var_depth(
&self,
context: &Rant,
id: &str,
access: AccessPathKind
) -> RuntimeResult<usize>
[src]
&self,
context: &Rant,
id: &str,
access: AccessPathKind
) -> RuntimeResult<usize>
pub fn get_var_value(
&self,
context: &Rant,
id: &str,
access: AccessPathKind,
prefer_function: bool
) -> RuntimeResult<RantValue>
[src]
&self,
context: &Rant,
id: &str,
access: AccessPathKind,
prefer_function: bool
) -> RuntimeResult<RantValue>
Gets a variable’s value using the specified access type.
pub fn get_var_mut<'a>(
&'a mut self,
context: &'a mut Rant,
id: &str,
access: AccessPathKind
) -> RuntimeResult<&'a mut RantVar>
[src]
&'a mut self,
context: &'a mut Rant,
id: &str,
access: AccessPathKind
) -> RuntimeResult<&'a mut RantVar>
Gets a mutable reference to a variable.
pub fn def_local_var(&mut self, id: &str, var: RantVar) -> RuntimeResult<()>
[src]
Defines a local variable of the specified name.
Notes
This function does not perform any identifier validation.
pub fn def_var_value(
&mut self,
context: &mut Rant,
id: &str,
access: AccessPathKind,
val: RantValue,
is_const: bool
) -> RuntimeResult<()>
[src]
&mut self,
context: &mut Rant,
id: &str,
access: AccessPathKind,
val: RantValue,
is_const: bool
) -> RuntimeResult<()>
Defines a variable of the specified name by-value.
Notes
This function does not perform any identifier validation.
pub fn taste_for_first(&self, target_flavor: StackFrameFlavor) -> Option<usize>
[src]
Scans (“tastes”) the stack from the top looking for the first occurrence of the specified frame flavor.
Returns the top-relative index of the first occurrence, or None
if no match was found or a stronger flavor was found first.
pub fn taste_for(&self, target_flavor: StackFrameFlavor) -> Option<usize>
[src]
Scans (“tastes”) the stack from the top looking for the first occurrence of the specified frame flavor.
Returns the top-relative index of the first occurrence, or None
if no match was found or another flavor was found first.
Trait Implementations
Auto Trait Implementations
impl<I> !RefUnwindSafe for CallStack<I>
impl<I> !RefUnwindSafe for CallStack<I>
impl<I> !UnwindSafe for CallStack<I>
impl<I> !UnwindSafe for CallStack<I>