pub struct CallStack { /* private fields */ }Expand description
Encapsulates a function call stack.
Implementations§
Source§impl CallStack
impl CallStack
Sourcepub fn pop(&mut self) -> Option<FunctionCall>
pub fn pop(&mut self) -> Option<FunctionCall>
Removes the top from from the stack. If the stack is empty, does nothing and
returns None; otherwise, returns the removed call frame.
Sourcepub fn push(
&mut self,
name: impl Into<String>,
function_def: &Arc<FunctionDefinition>,
)
pub fn push( &mut self, name: impl Into<String>, function_def: &Arc<FunctionDefinition>, )
Pushes a new frame onto the stack.
§Arguments
name- The name of the function being called.function_def- The definition of the function being called.
Sourcepub fn iter(&self) -> impl Iterator<Item = &FunctionCall>
pub fn iter(&self) -> impl Iterator<Item = &FunctionCall>
Returns an iterator over the function call frames, starting from the most recent.
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 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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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