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

Method load

crates/component-macro/tests/expanded/char.rs:125–134  ·  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

123 /// Note that at this time this method will additionally
124 /// perform type-checks of all exports.
125 pub fn load(
126 &self,
127 mut store: impl wasmtime::AsContextMut,
128 instance: &wasmtime::component::Instance,
129 ) -> wasmtime::Result<TheWorld> {
130 let _ = &mut store;
131 let _instance = instance;
132 let interface0 = self.interface0.load(&mut store, &_instance)?;
133 Ok(TheWorld { interface0 })
134 }
135 }
136 impl TheWorld {
137 /// 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