pub struct Stack {
pub frames: Vec<StackFrame>,
pub depth: usize,
}Expand description
The frames a runtime error unwound through, innermost first, ending with the top-level form that started the chain when it was recorded.
Fields§
§frames: Vec<StackFrame>§depth: usizeActivations unwound, recorded or not. Above frames.len() when the
recursion was deeper than tatara_lisp_eval::observe::TRACE_FRAMES.
Implementations§
Source§impl Stack
impl Stack
pub fn is_empty(&self) -> bool
Sourcepub fn of(
program: &ResolvedProgram,
defs: &Definitions,
trace: &Trace,
error: Span,
top_level: usize,
) -> Self
pub fn of( program: &ResolvedProgram, defs: &Definitions, trace: &Trace, error: Span, top_level: usize, ) -> Self
Read a Trace against the program that ran. error is where the
innermost frame raised; top_level the form that was executing.
pub fn json(&self) -> Value
Trait Implementations§
impl Eq for Stack
impl StructuralPartialEq for Stack
Auto Trait Implementations§
impl Freeze for Stack
impl RefUnwindSafe for Stack
impl Send for Stack
impl Sync for Stack
impl Unpin for Stack
impl UnsafeUnpin for Stack
impl UnwindSafe for Stack
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.