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

Method interface

crates/moonbit/src/lib.rs:144–163  ·  view source on GitHub ↗
(
        &'a mut self,
        resolve: &'a Resolve,
        name: &'a str,
        direction: Direction,
        interface: Option<&'a WorldKey>,
    )

Source from the content-addressed store, hash-verified

142
143impl MoonBit {
144 fn interface<'a>(
145 &'a mut self,
146 resolve: &'a Resolve,
147 name: &'a str,
148 direction: Direction,
149 interface: Option<&'a WorldKey>,
150 ) -> InterfaceGenerator<'a> {
151 let derive_opts = self.opts.derive.clone();
152 InterfaceGenerator {
153 src: String::new(),
154 ffi: String::new(),
155 world_gen: self,
156 resolve,
157 name,
158 direction,
159 ffi_imports: HashSet::new(),
160 derive_opts,
161 interface,
162 }
163 }
164
165 fn write_moon_pkg(&self, moon_pkg: &mut Source, imports: Option<&Imports>, link: bool) {
166 // Disable warning for invalid inline wasm

Callers 5

import_interfaceMethod · 0.45
import_funcsMethod · 0.45
import_typesMethod · 0.45
export_interfaceMethod · 0.45
export_funcsMethod · 0.45

Calls 1

newFunction · 0.85

Tested by

no test coverage detected