Skip to main content

FunctionLookup

Trait FunctionLookup 

Source
pub trait FunctionLookup {
    // Required methods
    fn function_address(&self, name: &str) -> Result<u32>;
    fn function_index(&self, name: &str) -> Result<u32>;
}
Expand description

Resolve function names in the section currently being lowered.

Calls need an executable address; reference constants need a function-table index. These are separate values even when a program happens to make them equal.

Required Methods§

Source

fn function_address(&self, name: &str) -> Result<u32>

Source

fn function_index(&self, name: &str) -> Result<u32>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl FunctionLookup for MetadataLoweringContext

Source§

fn function_address(&self, name: &str) -> Result<u32>

Source§

fn function_index(&self, name: &str) -> Result<u32>

Implementors§