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

Method load

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

Uses the indices stored in `self` to load an instance of [`TheWorld`] 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<TheWorld> {
132 let _ = &mut store;
133 let _instance = instance;
134 let interface0 = self.interface0.load(&mut store, &_instance)?;
135 Ok(TheWorld { interface0 })
136 }
137 }
138 impl TheWorld {
139 /// Convenience wrapper around [`TheWorldPre::new`] and

Callers 3

instantiateMethod · 0.45
instantiate_asyncMethod · 0.45
newMethod · 0.45

Calls 5

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

Tested by

no test coverage detected