Struct symbolic::debuginfo::wasm::WasmObject[][src]

pub struct WasmObject<'data> { /* fields omitted */ }

Wasm object container (.wasm), used for executables and debug companions on web and wasi.

This can only parse binary wasm file and not wast files.

Implementations

impl<'data> WasmObject<'data>[src]

pub fn test(data: &[u8]) -> bool[src]

Tests whether the buffer could contain a WASM object.

pub fn parse(data: &'data [u8]) -> Result<WasmObject<'data>, WasmError>[src]

Tries to parse a WASM from the given slice.

pub fn file_format(&self) -> FileFormat[src]

The container file format, which currently is always FileFormat::Wasm.

pub fn code_id(&self) -> Option<CodeId>[src]

The code identifier of this object.

Wasm does not yet provide code IDs.

pub fn debug_id(&self) -> DebugId[src]

The debug information identifier of a WASM file.

Wasm does not yet provide debug IDs.

pub fn arch(&self) -> Arch[src]

The CPU architecture of this object.

pub fn kind(&self) -> ObjectKind[src]

The kind of this object.

pub fn load_address(&self) -> u64[src]

The address at which the image prefers to be loaded into memory.

This is always 0 as this does not really apply to WASM.

pub fn has_symbols(&self) -> bool[src]

Determines whether this object exposes a public symbol table.

pub fn symbols(&self) -> WasmSymbolIterator<'data, '_>

Notable traits for WasmSymbolIterator<'data, 'object>

impl<'data, 'object> Iterator for WasmSymbolIterator<'data, 'object> type Item = Symbol<'data>;
[src]

Returns an iterator over symbols in the public symbol table.

pub fn symbol_map(&self) -> SymbolMap<'data>[src]

Returns an ordered map of symbols in the symbol table.

pub fn has_debug_info(&self) -> bool[src]

Determines whether this object contains debug information.

pub fn debug_session(&self) -> Result<DwarfDebugSession<'data>, DwarfError>[src]

Constructs a debugging session.

pub fn has_unwind_info(&self) -> bool[src]

Determines whether this object contains stack unwinding information.

pub fn has_sources(&self) -> bool[src]

Determines whether this object contains embedded source.

pub fn data(&self) -> &'data [u8]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

Returns the raw data of the WASM file.

pub fn code_offset(&self) -> u64[src]

Returns the offset of the code section.

Trait Implementations

impl<'slf, 'd> AsSelf<'slf> for WasmObject<'d> where
    'd: 'slf, 
[src]

type Ref = WasmObject<'slf>

The Self type with 'slf lifetimes, returned by as_self.

impl<'_> Debug for WasmObject<'_>[src]

impl<'d> Dwarf<'d> for WasmObject<'d>[src]

impl<'data, 'object> ObjectLike<'data, 'object> for WasmObject<'data> where
    'data: 'object, 
[src]

type Error = DwarfError

Errors thrown when reading information from this object.

type Session = DwarfDebugSession<'data>

A session that allows optimized access to debugging information.

type SymbolIterator = WasmSymbolIterator<'data, 'object>

The iterator over the symbols in the public symbol table.

Auto Trait Implementations

impl<'data> !RefUnwindSafe for WasmObject<'data>[src]

impl<'data> Send for WasmObject<'data>[src]

impl<'data> Sync for WasmObject<'data>[src]

impl<'data> Unpin for WasmObject<'data>[src]

impl<'data> !UnwindSafe for WasmObject<'data>[src]

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, 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.