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

Method import_funcs

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

Source from the content-addressed store, hash-verified

136 }
137
138 fn import_funcs(
139 &mut self,
140 resolve: &Resolve,
141 world: WorldId,
142 funcs: &[(&str, &Function)],
143 _files: &mut Files,
144 ) {
145 let name = &resolve.worlds[world].name;
146 uwriteln!(self.src, "## Imported functions to world `{name}`\n");
147 let mut r#gen = self.interface(resolve);
148 for (_, func) in funcs {
149 r#gen.func(func);
150 }
151 }
152
153 fn export_interface(
154 &mut self,

Callers

nothing calls this directly

Calls 2

funcMethod · 0.80
interfaceMethod · 0.45

Tested by

no test coverage detected