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

Method qualifier

crates/moonbit/src/pkg.rs:56–75  ·  view source on GitHub ↗
(&mut self, this: &str, ty: &TypeDef)

Source from the content-addressed store, hash-verified

54 }
55
56 pub(crate) fn qualifier(&mut self, this: &str, ty: &TypeDef) -> String {
57 if let TypeOwner::Interface(id) = &ty.owner {
58 if let Some(name) = self.export_interface_names.get(id) {
59 if name != this {
60 return self.qualify_package(this, &name.clone());
61 }
62 } else if let Some(name) = self.import_interface_names.get(id) {
63 if name != this {
64 return self.qualify_package(this, &name.clone());
65 }
66 }
67 } else if let TypeOwner::World(id) = &ty.owner {
68 let name = PkgResolver::world_name(&self.resolve, *id);
69 if name != this {
70 return self.qualify_package(this, &name.clone());
71 }
72 }
73
74 String::new()
75 }
76
77 pub(crate) fn func_call(
78 &mut self,

Callers

nothing calls this directly

Calls 3

newFunction · 0.85
qualify_packageMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected