pub struct StackChirho { /* private fields */ }Expand description
The evaluation stack.
Implementations§
Source§impl StackChirho
impl StackChirho
Sourcepub fn new_chirho() -> Self
pub fn new_chirho() -> Self
Create a new empty stack.
Sourcepub fn push_chirho(&mut self, frame_chirho: FrameChirho)
pub fn push_chirho(&mut self, frame_chirho: FrameChirho)
Push a continuation frame.
Sourcepub fn pop_chirho(&mut self) -> Option<FrameChirho>
pub fn pop_chirho(&mut self) -> Option<FrameChirho>
Pop the top continuation frame, if any.
Sourcepub fn peek_chirho(&self) -> Option<&FrameChirho>
pub fn peek_chirho(&self) -> Option<&FrameChirho>
Peek at the top frame without popping.
Sourcepub fn is_empty_chirho(&self) -> bool
pub fn is_empty_chirho(&self) -> bool
Whether the stack is empty.
Sourcepub fn depth_chirho(&self) -> usize
pub fn depth_chirho(&self) -> usize
Current stack depth.
Sourcepub fn max_depth_chirho(&self) -> usize
pub fn max_depth_chirho(&self) -> usize
Maximum stack depth reached during execution.
Sourcepub fn frames_chirho(&self) -> &[FrameChirho]
pub fn frames_chirho(&self) -> &[FrameChirho]
Borrow all frames (for GC root extraction).
Sourcepub fn unwind_to_catch_chirho(&mut self) -> Option<FrameChirho>
pub fn unwind_to_catch_chirho(&mut self) -> Option<FrameChirho>
Unwind the stack looking for a CatchChirho or TryFrameChirho frame.
Returns the frame if found, popping all frames above it (including the
handler frame itself). Returns None if no such frame exists.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StackChirho
impl RefUnwindSafe for StackChirho
impl Send for StackChirho
impl Sync for StackChirho
impl Unpin for StackChirho
impl UnsafeUnpin for StackChirho
impl UnwindSafe for StackChirho
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