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

Method insert

crates/core/src/ns.rs:10–16  ·  view source on GitHub ↗
(&mut self, name: &str)

Source from the content-addressed store, hash-verified

8
9impl Ns {
10 pub fn insert(&mut self, name: &str) -> Result<(), String> {
11 if self.defined.insert(name.to_string()) {
12 Ok(())
13 } else {
14 Err(format!("name `{name}` already defined"))
15 }
16 }
17
18 pub fn tmp(&mut self, name: &str) -> String {
19 let mut ret = name.to_string();

Callers 15

gen_worldFunction · 0.45
named_roundtripMethod · 0.45
inline_roundtripMethod · 0.45
multi_param_roundtripMethod · 0.45
test_named_roundtripFunction · 0.45
test_bytes_roundtripFunction · 0.45
test_option_roundtripFunction · 0.45
test_record_roundtripFunction · 0.45
test_inline_roundtripFunction · 0.45
test_large_mapFunction · 0.45
test_nested_roundtripFunction · 0.45

Calls 1

to_stringMethod · 0.45

Tested by 15

named_roundtripMethod · 0.36
inline_roundtripMethod · 0.36
multi_param_roundtripMethod · 0.36
test_named_roundtripFunction · 0.36
test_bytes_roundtripFunction · 0.36
test_option_roundtripFunction · 0.36
test_record_roundtripFunction · 0.36
test_inline_roundtripFunction · 0.36
test_large_mapFunction · 0.36
test_nested_roundtripFunction · 0.36
test_variant_roundtripFunction · 0.36