mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-09 14:18:20 +00:00
13 lines
378 B
Rust
13 lines
378 B
Rust
struct Instance {
|
|
exports: Exports,
|
|
}
|
|
|
|
impl Instance {
|
|
fn load<T>(&self, _loader: T) -> Result<Self, ()>;
|
|
fn resolve_func(&self, name: &str) -> Result<usize, ()>;
|
|
fn call(&self, name: &str, params: &[Value]) -> Result<Vec<Value>, Box<dyn Error>>;
|
|
fn context(&self) -> Ref<Ctx>;
|
|
fn context_mut(&mut self) -> RefMut<Ctx>;
|
|
fn module(&self) -> Module;
|
|
}
|