pub struct CallStack { /* private fields */ }Expand description
The call stack.
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 with a custom maximum depth.
Sourcepub fn push(&mut self, frame: StackFrame) -> Result<(), StackOverflow>
pub fn push(&mut self, frame: StackFrame) -> Result<(), StackOverflow>
Push a frame onto the stack.
Sourcepub fn pop(&mut self) -> Option<StackFrame>
pub fn pop(&mut self) -> Option<StackFrame>
Pop a frame from the stack.
Sourcepub fn current(&self) -> Option<&StackFrame>
pub fn current(&self) -> Option<&StackFrame>
Get the current (top) frame.
Sourcepub fn current_mut(&mut self) -> Option<&mut StackFrame>
pub fn current_mut(&mut self) -> Option<&mut StackFrame>
Get the current (top) frame mutably.
Sourcepub fn set_max_depth(&mut self, depth: usize)
pub fn set_max_depth(&mut self, depth: usize)
Set the maximum depth.
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