Struct rant::runtime::CallStack [−][src]
Represents a call stack and its associated locals.
Implementations
impl CallStack
[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>
[src]
Removes the topmost frame from the stack and returns it.
pub fn push_frame(&mut self, frame: StackFrame)
[src]
Adds a frame to the top of the stack.
pub fn top_mut(&mut self) -> Option<&mut StackFrame>
[src]
Returns a mutable reference to the topmost frame in the stack.
pub fn parent_mut(&mut self, depth: usize) -> Option<&mut StackFrame>
[src]
Returns a mutable reference to the frame depth
frames below the top of the stack.
pub fn top(&self) -> Option<&StackFrame>
[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_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 !RefUnwindSafe for CallStack
impl !Send for CallStack
impl !Sync for CallStack
impl Unpin for CallStack
impl !UnwindSafe for CallStack
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,