MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / load

Method load

crates/component-macro/tests/expanded/wat.rs:127–136  ·  view source on GitHub ↗

Uses the indices stored in `self` to load an instance of [`Example`] from the instance provided. Note that at this time this method will additionally perform type-checks of all exports.

(
            &self,
            mut store: impl wasmtime::AsContextMut,
            instance: &wasmtime::component::Instance,
        )

Source from the content-addressed store, hash-verified

125 /// Note that at this time this method will additionally
126 /// perform type-checks of all exports.
127 pub fn load(
128 &self,
129 mut store: impl wasmtime::AsContextMut,
130 instance: &wasmtime::component::Instance,
131 ) -> wasmtime::Result<Example> {
132 let _ = &mut store;
133 let _instance = instance;
134 let interface0 = self.interface0.load(&mut store, &_instance)?;
135 Ok(Example { interface0 })
136 }
137 }
138 impl Example {
139 /// Convenience wrapper around [`ExamplePre::new`] and

Callers 6

cache_hitsMethod · 0.45
cache_missesMethod · 0.45
instantiateMethod · 0.45
instantiate_asyncMethod · 0.45
newMethod · 0.45
enabledFunction · 0.45

Calls 4

OkFunction · 0.85
instance_preMethod · 0.45
instance_typeMethod · 0.45
as_context_mutMethod · 0.45

Tested by

no test coverage detected