[−][src]Struct wasmer::FrameInfo
Description of a frame in a backtrace for a RuntimeError::trace
.
Whenever a WebAssembly trap occurs an instance of RuntimeError
is created. Each RuntimeError
has a backtrace of the
WebAssembly frames that led to the trap, and each frame is
described by this structure.
Implementations
impl FrameInfo
[src]
pub fn func_index(&self) -> u32
[src]
Returns the WebAssembly function index for this frame.
This function index is the index in the function index space of the WebAssembly module that this frame comes from.
pub fn module_name(&self) -> &str
[src]
Returns the identifer of the module that this frame is for.
ModuleInfo identifiers are present in the name
section of a WebAssembly
binary, but this may not return the exact item in the name
section.
ModuleInfo names can be overwritten at construction time or perhaps inferred
from file names. The primary purpose of this function is to assist in
debugging and therefore may be tweaked over time.
This function returns None
when no name can be found or inferred.
pub fn function_name(&self) -> Option<&str>
[src]
Returns a descriptive name of the function for this frame, if one is available.
The name of this function may come from the name
section of the
WebAssembly binary, or wasmer may try to infer a better name for it if
not available, for example the name of the export if it's exported.
This return value is primarily used for debugging and human-readable purposes for things like traps. Note that the exact return value may be tweaked over time here and isn't guaranteed to be something in particular about a wasm module due to its primary purpose of assisting in debugging.
This function returns None
when no name could be inferred.
pub fn module_offset(&self) -> usize
[src]
Returns the offset within the original wasm module this frame's program counter was at.
The offset here is the offset from the beginning of the original wasm module to the instruction that this frame points to.
pub fn func_offset(&self) -> usize
[src]
Returns the offset from the original wasm module's function to this frame's program counter.
The offset here is the offset from the beginning of the defining function of this frame (within the wasm module) to the instruction this frame points to.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FrameInfo
[src]
impl Send for FrameInfo
[src]
impl Sync for FrameInfo
[src]
impl Unpin for FrameInfo
[src]
impl UnwindSafe for FrameInfo
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,