pub struct ModuleInstance<V: VectorFactory, H> {
pub module: Module<V>,
pub executor: Executor<V>,
pub funcs: V::Vector<FuncInst<H>>,
}Fields§
§module: Module<V>§executor: Executor<V>§funcs: V::Vector<FuncInst<H>>Implementations§
Source§impl<V: VectorFactory, H: HostFunc> ModuleInstance<V, H>
impl<V: VectorFactory, H: HostFunc> ModuleInstance<V, H>
pub fn module(&self) -> &Module<V>
pub fn mem(&self) -> &[u8] ⓘ
pub fn mem_mut(&mut self) -> &mut [u8] ⓘ
pub fn globals(&self) -> &[GlobalVal]
pub fn globals_mut(&mut self) -> &mut [GlobalVal]
pub fn table(&self) -> &[Option<Funcidx>]
pub fn table_mut(&mut self) -> &mut [Option<Funcidx>]
pub fn funcs(&self) -> &[FuncInst<H>]
pub fn invoke( &mut self, function_name: &str, args: &[Val], ) -> Result<Option<Val>, ExecuteError>
Trait Implementations§
Auto Trait Implementations§
impl<V, H> Freeze for ModuleInstance<V, H>where
<V as VectorFactory>::Vector<FuncInst<H>>: Freeze,
<V as VectorFactory>::Vector<Functype<V>>: Freeze,
<V as VectorFactory>::Vector<Func<V>>: Freeze,
<V as VectorFactory>::Vector<Import<V>>: Freeze,
<V as VectorFactory>::Vector<Global>: Freeze,
<V as VectorFactory>::Vector<Elem<V>>: Freeze,
<V as VectorFactory>::Vector<Data<V>>: Freeze,
<V as VectorFactory>::Vector<Export<V>>: Freeze,
<V as VectorFactory>::Vector<u8>: Freeze,
<V as VectorFactory>::Vector<Option<Funcidx>>: Freeze,
<V as VectorFactory>::Vector<GlobalVal>: Freeze,
<V as VectorFactory>::Vector<Val>: Freeze,
impl<V, H> RefUnwindSafe for ModuleInstance<V, H>where
<V as VectorFactory>::Vector<FuncInst<H>>: RefUnwindSafe,
<V as VectorFactory>::Vector<Functype<V>>: RefUnwindSafe,
<V as VectorFactory>::Vector<Func<V>>: RefUnwindSafe,
<V as VectorFactory>::Vector<Import<V>>: RefUnwindSafe,
<V as VectorFactory>::Vector<Global>: RefUnwindSafe,
<V as VectorFactory>::Vector<Elem<V>>: RefUnwindSafe,
<V as VectorFactory>::Vector<Data<V>>: RefUnwindSafe,
<V as VectorFactory>::Vector<Export<V>>: RefUnwindSafe,
<V as VectorFactory>::Vector<u8>: RefUnwindSafe,
<V as VectorFactory>::Vector<Option<Funcidx>>: RefUnwindSafe,
<V as VectorFactory>::Vector<GlobalVal>: RefUnwindSafe,
<V as VectorFactory>::Vector<Val>: RefUnwindSafe,
impl<V, H> Send for ModuleInstance<V, H>where
<V as VectorFactory>::Vector<FuncInst<H>>: Send,
<V as VectorFactory>::Vector<Functype<V>>: Send,
<V as VectorFactory>::Vector<Func<V>>: Send,
<V as VectorFactory>::Vector<Import<V>>: Send,
<V as VectorFactory>::Vector<Global>: Send,
<V as VectorFactory>::Vector<Elem<V>>: Send,
<V as VectorFactory>::Vector<Data<V>>: Send,
<V as VectorFactory>::Vector<Export<V>>: Send,
<V as VectorFactory>::Vector<u8>: Send,
<V as VectorFactory>::Vector<Option<Funcidx>>: Send,
<V as VectorFactory>::Vector<GlobalVal>: Send,
<V as VectorFactory>::Vector<Val>: Send,
impl<V, H> Sync for ModuleInstance<V, H>where
<V as VectorFactory>::Vector<FuncInst<H>>: Sync,
<V as VectorFactory>::Vector<Functype<V>>: Sync,
<V as VectorFactory>::Vector<Func<V>>: Sync,
<V as VectorFactory>::Vector<Import<V>>: Sync,
<V as VectorFactory>::Vector<Global>: Sync,
<V as VectorFactory>::Vector<Elem<V>>: Sync,
<V as VectorFactory>::Vector<Data<V>>: Sync,
<V as VectorFactory>::Vector<Export<V>>: Sync,
<V as VectorFactory>::Vector<u8>: Sync,
<V as VectorFactory>::Vector<Option<Funcidx>>: Sync,
<V as VectorFactory>::Vector<GlobalVal>: Sync,
<V as VectorFactory>::Vector<Val>: Sync,
impl<V, H> Unpin for ModuleInstance<V, H>where
<V as VectorFactory>::Vector<FuncInst<H>>: Unpin,
<V as VectorFactory>::Vector<Functype<V>>: Unpin,
<V as VectorFactory>::Vector<Func<V>>: Unpin,
<V as VectorFactory>::Vector<Import<V>>: Unpin,
<V as VectorFactory>::Vector<Global>: Unpin,
<V as VectorFactory>::Vector<Elem<V>>: Unpin,
<V as VectorFactory>::Vector<Data<V>>: Unpin,
<V as VectorFactory>::Vector<Export<V>>: Unpin,
<V as VectorFactory>::Vector<u8>: Unpin,
<V as VectorFactory>::Vector<Option<Funcidx>>: Unpin,
<V as VectorFactory>::Vector<GlobalVal>: Unpin,
<V as VectorFactory>::Vector<Val>: Unpin,
impl<V, H> UnwindSafe for ModuleInstance<V, H>where
<V as VectorFactory>::Vector<FuncInst<H>>: UnwindSafe,
<V as VectorFactory>::Vector<Functype<V>>: UnwindSafe,
<V as VectorFactory>::Vector<Func<V>>: UnwindSafe,
<V as VectorFactory>::Vector<Import<V>>: UnwindSafe,
<V as VectorFactory>::Vector<Global>: UnwindSafe,
<V as VectorFactory>::Vector<Elem<V>>: UnwindSafe,
<V as VectorFactory>::Vector<Data<V>>: UnwindSafe,
<V as VectorFactory>::Vector<Export<V>>: UnwindSafe,
<V as VectorFactory>::Vector<u8>: UnwindSafe,
<V as VectorFactory>::Vector<Option<Funcidx>>: UnwindSafe,
<V as VectorFactory>::Vector<GlobalVal>: UnwindSafe,
<V as VectorFactory>::Vector<Val>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more