[−][src]Struct walrus::IndicesToIds
Maps from old indices in the original Wasm binary to walrus
IDs.
This is intended to be used with walrus::Module
s that were parsed from
some existing Wasm binary. walrus::Module
s that are built up from scratch,
and not originally parsed from an existing Wasm binary, will have an empty
IndicesToIds
.
For example, this allows you to get the walrus::FunctionId
of some Wasm
function when you have its old index in the original Wasm module.
Any newly built or added things (functions, tables, types, etc) are not associated with an old index (since they were not present in the original Wasm binary).
Methods
impl IndicesToIds
[src]
pub fn get_table(&self, index: u32) -> Result<TableId>
[src]
Gets the ID for a particular index.
If the index did not exist in the original Wasm binary, an Err
is returned.
impl IndicesToIds
[src]
pub fn get_type(&self, index: u32) -> Result<TypeId>
[src]
Gets the ID for a particular index.
If the index did not exist in the original Wasm binary, an Err
is returned.
impl IndicesToIds
[src]
pub fn get_func(&self, index: u32) -> Result<FunctionId>
[src]
Gets the ID for a particular index.
If the index did not exist in the original Wasm binary, an Err
is returned.
impl IndicesToIds
[src]
pub fn get_global(&self, index: u32) -> Result<GlobalId>
[src]
Gets the ID for a particular index.
If the index did not exist in the original Wasm binary, an Err
is returned.
impl IndicesToIds
[src]
pub fn get_memory(&self, index: u32) -> Result<MemoryId>
[src]
Gets the ID for a particular index.
If the index did not exist in the original Wasm binary, an Err
is returned.
impl IndicesToIds
[src]
pub fn get_data(&self, index: u32) -> Result<DataId>
[src]
Gets the ID for a particular index.
If the index did not exist in the original Wasm binary, an Err
is returned.
impl IndicesToIds
[src]
pub fn get_local(&self, function: FunctionId, index: u32) -> Result<LocalId>
[src]
Gets the ID for a particular index
Trait Implementations
Auto Trait Implementations
impl Send for IndicesToIds
impl Sync for IndicesToIds
impl Unpin for IndicesToIds
impl UnwindSafe for IndicesToIds
impl RefUnwindSafe for IndicesToIds
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for 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.
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,