MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / result_name

Method result_name

crates/wit-bindgen/src/rust.rs:353–365  ·  view source on GitHub ↗
(&self, ty: TypeId)

Source from the content-addressed store, hash-verified

351 }
352
353 fn result_name(&self, ty: TypeId) -> String {
354 let info = self.info(ty);
355 let name = self.resolve().types[ty]
356 .name
357 .as_ref()
358 .unwrap()
359 .to_upper_camel_case();
360 if self.uses_two_names(&info) {
361 format!("{name}Result")
362 } else {
363 name
364 }
365 }
366
367 fn uses_two_names(&self, info: &TypeInfo) -> bool {
368 info.has_list

Callers 2

tyidMethod · 0.80
modes_ofMethod · 0.80

Implementers 1

lib.rscrates/wit-bindgen/src/lib.rs

Calls 5

infoMethod · 0.80
uses_two_namesMethod · 0.80
unwrapMethod · 0.45
as_refMethod · 0.45
resolveMethod · 0.45

Tested by

no test coverage detected