[][src]Struct wasmtime::FrameInfo

pub struct FrameInfo { /* fields omitted */ }

Description of a frame in a backtrace for a Trap.

Whenever a WebAssembly trap occurs an instance of Trap is created. Each Trap has a backtrace of the WebAssembly frames that led to the trap, and each frame is described by this structure.

Methods

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) -> Option<&str>[src]

Returns the identifer of the module that this frame is for.

Module identifiers are present in the name section of a WebAssembly binary, but this may not return the exact item in the name section. Module 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 func_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 wasmtime 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.

Trait Implementations

impl Debug for FrameInfo[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.