doc(deprecated) Start documenting the diff between the old and the new API.

This commit is contained in:
Ivan Enderlin
2020-06-30 16:42:12 +02:00
parent 58d8b7f4f2
commit 921c48ea77
4 changed files with 50 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
struct Instance {
module: Arc<ModuleInner>,
exports: Exports,
}
impl Instance {
fn load<T: Loader>(&self, loader: T) -> Result<T::Instnace, T::Error>;
fn fun<Args, Rets>(&self, name: &str) -> ResolveResult<Args, Rets, Wasm>;
fn resolve_func(&self, name: &str) -> ResolveError<usize>;
fn dyn_func(&self, name: &str) -> ResolveResult<DynFunc>;
fn call(&self, name: &str, params: &[Value]) -> CallResult<Vec<Value>>;
fn context(&self) -> &Ctx;
fn context_mut(&mut self) -> &mut Ctx;
fn exports(&self) -> ExportsIter;
fn module(&self) -> Module;
fn get_internal(&self, fields: &InternalField) -> u64;
fn set_internal(&self, fields: &InternalField, value: u64);
}