pub struct DebugFrameCursor<'a> { /* private fields */ }
Expand description
A view of an active stack frame, with the ability to move up the stack.
See the documentation on Store::stack_value
for more information
about which frames this view will show.
Implementations§
Source§impl<'a> DebugFrameCursor<'a>
impl<'a> DebugFrameCursor<'a>
Sourcepub fn move_to_parent(&mut self)
pub fn move_to_parent(&mut self)
Move up to the next frame in the activation.
Sourcepub fn module(&self) -> Option<&Module>
pub fn module(&self) -> Option<&Module>
Get the module associated with the current frame, if any (i.e., not a container instance for a host-created entity).
Sourcepub fn wasm_function_index_and_pc(&self) -> Option<(DefinedFuncIndex, u32)>
pub fn wasm_function_index_and_pc(&self) -> Option<(DefinedFuncIndex, u32)>
Get the raw function index associated with the current frame, and the
PC as an offset within its code section, if it is a Wasm
function directly from the given Module
(rather than a
trampoline).
Sourcepub fn num_locals(&self) -> u32
pub fn num_locals(&self) -> u32
Get the number of locals in this frame.
Sourcepub fn num_stacks(&self) -> u32
pub fn num_stacks(&self) -> u32
Get the depth of the operand stack in this frame.
Sourcepub fn local(&mut self, index: u32) -> Val
pub fn local(&mut self, index: u32) -> Val
Get the type and value of the given local in this frame.
§Panics
Panics if the index is out-of-range (greater than
num_locals()
).
Sourcepub fn stack(&mut self, index: u32) -> Val
pub fn stack(&mut self, index: u32) -> Val
Get the type and value of the given operand-stack value in this frame.
Index 0 corresponds to the bottom-of-stack, and higher indices from there are more recently pushed values. In other words, index order reads the Wasm virtual machine’s abstract stack state left-to-right.
Auto Trait Implementations§
impl<'a> Freeze for DebugFrameCursor<'a>
impl<'a> !RefUnwindSafe for DebugFrameCursor<'a>
impl<'a> !Send for DebugFrameCursor<'a>
impl<'a> !Sync for DebugFrameCursor<'a>
impl<'a> Unpin for DebugFrameCursor<'a>
impl<'a> !UnwindSafe for DebugFrameCursor<'a>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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