MCPcopy Create free account
hub / github.com/bytecodealliance/wit-bindgen / export_funcs

Method export_funcs

crates/markdown/src/lib.rs:174–188  ·  view source on GitHub ↗
(
        &mut self,
        resolve: &Resolve,
        world: WorldId,
        funcs: &[(&str, &Function)],
        _files: &mut Files,
    )

Source from the content-addressed store, hash-verified

172 }
173
174 fn export_funcs(
175 &mut self,
176 resolve: &Resolve,
177 world: WorldId,
178 funcs: &[(&str, &Function)],
179 _files: &mut Files,
180 ) -> Result<()> {
181 let name = &resolve.worlds[world].name;
182 uwriteln!(self.src, "## Exported functions from world `{name}`\n");
183 let mut r#gen = self.interface(resolve);
184 for (_, func) in funcs {
185 r#gen.func(func);
186 }
187 Ok(())
188 }
189
190 fn import_types(
191 &mut self,

Callers

nothing calls this directly

Calls 2

funcMethod · 0.80
interfaceMethod · 0.45

Tested by

no test coverage detected