Struct symbolic_debuginfo::wasm::WasmObject [−][src]
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<Self, 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]
Notable traits for WasmSymbolIterator<'data, 'object>
impl<'data, 'object> Iterator for WasmSymbolIterator<'data, 'object> type Item = Symbol<'data>;
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]ⓘ
[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: 'slf> AsSelf<'slf> for WasmObject<'d>
[src]
type Ref = WasmObject<'slf>
The Self
type with 'slf
lifetimes, returned by as_self
.
fn as_self(&'slf self) -> &Self::Ref
[src]
impl Debug for WasmObject<'_>
[src]
impl<'d> Dwarf<'d> for WasmObject<'d>
[src]
fn endianity(&self) -> Endian
[src]
fn raw_section(&self, section_name: &str) -> Option<DwarfSection<'d>>
[src]
fn section(&self, name: &str) -> Option<DwarfSection<'data>>
[src]
fn has_section(&self, name: &str) -> bool
[src]
impl<'data: 'object, 'object> ObjectLike<'data, 'object> for WasmObject<'data>
[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.
fn file_format(&self) -> FileFormat
[src]
fn code_id(&self) -> Option<CodeId>
[src]
fn debug_id(&self) -> DebugId
[src]
fn arch(&self) -> Arch
[src]
fn kind(&self) -> ObjectKind
[src]
fn load_address(&self) -> u64
[src]
fn has_symbols(&self) -> bool
[src]
fn symbols(&'object self) -> Self::SymbolIterator
[src]
fn symbol_map(&self) -> SymbolMap<'data>
[src]
fn has_debug_info(&self) -> bool
[src]
fn debug_session(&self) -> Result<Self::Session, Self::Error>
[src]
fn has_unwind_info(&self) -> bool
[src]
fn has_sources(&self) -> bool
[src]
Auto Trait Implementations
impl<'data> !RefUnwindSafe for WasmObject<'data>
impl<'data> Send for WasmObject<'data>
impl<'data> Sync for WasmObject<'data>
impl<'data> Unpin for WasmObject<'data>
impl<'data> !UnwindSafe for WasmObject<'data>
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, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,