Files
wasmer/lib/deprecated/runtime-core/doc/new-api/instance.rs
Ivan Enderlin a8857db2b6 feat(deprecated) Remove Instance::load.
This method cannot be ported. Prevent the user to deal with errors by
simply removing it.
2020-07-06 11:09:16 +02:00

15 lines
559 B
Rust

struct Instance {
exports: Exports,
}
impl Instance {
fn fun<Args, Rets>(&self, name: &str) -> Result<Func<Args, Rets>, ExportError>;
fn resolve_func(&self, name: &str) -> Result<usize, ()>;
fn dyn_func(&self, name: &str) -> Result<DynFunc, ExportError>;
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 exports(&self) -> ExportsIterator<impl Iterator<Item = (&String, &Export)>>;
fn module(&self) -> Module;
}