pub struct CallStack { /* private fields */ }Expand description
Call stack management
Implementations§
Source§impl CallStack
impl CallStack
Sourcepub fn with_max_depth(max_depth: usize) -> Self
pub fn with_max_depth(max_depth: usize) -> Self
Create a new call stack with specified maximum depth
§Arguments
max_depth- Maximum allowed call stack depth
Sourcepub fn pop(&mut self) -> ExecutionLocation
pub fn pop(&mut self) -> ExecutionLocation
Pop the top frame from the call stack
§Returns
The return location from the popped frame, or Completed if stack is empty
Sourcepub fn current_frame(&self) -> Option<&CallFrame>
pub fn current_frame(&self) -> Option<&CallFrame>
Get a reference to the current (top) frame
Sourcepub fn current_frame_mut(&mut self) -> Option<&mut CallFrame>
pub fn current_frame_mut(&mut self) -> Option<&mut CallFrame>
Get a mutable reference to the current (top) frame
Sourcepub fn find_frames_by_function(&self, function_name: &str) -> Vec<usize>
pub fn find_frames_by_function(&self, function_name: &str) -> Vec<usize>
Sourcepub fn get_summary(&self) -> CallStackSummary
pub fn get_summary(&self) -> CallStackSummary
Get a summary of the call stack
Sourcepub fn set_max_depth(&mut self, max_depth: usize)
pub fn set_max_depth(&mut self, max_depth: usize)
Set the maximum depth for the call stack
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CallStack
impl RefUnwindSafe for CallStack
impl Send for CallStack
impl Sync for CallStack
impl Unpin for CallStack
impl UnsafeUnpin for CallStack
impl UnwindSafe for CallStack
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more