pub struct ExplicitCallStack {
pub max_depth: usize,
/* private fields */
}Expand description
An explicit call stack used when TCO cannot be applied.
Fields§
§max_depth: usizeMaximum depth ever reached.
Implementations§
Source§impl ExplicitCallStack
impl ExplicitCallStack
Sourcepub fn push(&mut self, frame: StackFrame)
pub fn push(&mut self, frame: StackFrame)
Push a new frame.
Sourcepub fn pop(&mut self) -> Option<StackFrame>
pub fn pop(&mut self) -> Option<StackFrame>
Pop the top frame.
Sourcepub fn top(&self) -> Option<&StackFrame>
pub fn top(&self) -> Option<&StackFrame>
Peek at the top frame without removing it.
Sourcepub fn top_mut(&mut self) -> Option<&mut StackFrame>
pub fn top_mut(&mut self) -> Option<&mut StackFrame>
Peek at the top frame mutably.
Sourcepub fn format_backtrace(&self) -> String
pub fn format_backtrace(&self) -> String
Return a formatted backtrace string.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExplicitCallStack
impl RefUnwindSafe for ExplicitCallStack
impl Send for ExplicitCallStack
impl Sync for ExplicitCallStack
impl Unpin for ExplicitCallStack
impl UnsafeUnpin for ExplicitCallStack
impl UnwindSafe for ExplicitCallStack
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