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

Method print_optional_ty

crates/rust/src/interface.rs:1857–1865  ·  view source on GitHub ↗
(&mut self, ty: Option<&Type>, mode: TypeMode)

Source from the content-addressed store, hash-verified

1855 }
1856
1857 fn print_optional_ty(&mut self, ty: Option<&Type>, mode: TypeMode) {
1858 match ty {
1859 Some(ty) => {
1860 let mode = self.filter_mode_preserve_top(ty, mode);
1861 self.print_ty(ty, mode)
1862 }
1863 None => self.push_str("()"),
1864 }
1865 }
1866
1867 pub fn type_path(&self, id: TypeId, owned: bool) -> String {
1868 let full_wit_type_name = full_wit_type_name(self.resolve, id);

Callers 6

print_typedef_resultMethod · 0.80
type_futureMethod · 0.80
type_streamMethod · 0.80
anonymous_type_resultMethod · 0.80
anonymous_type_futureMethod · 0.80
anonymous_type_streamMethod · 0.80

Calls 3

print_tyMethod · 0.45
push_strMethod · 0.45

Tested by

no test coverage detected