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

Method print_borrowed_str

crates/rust/src/interface.rs:2545–2556  ·  view source on GitHub ↗
(&mut self, lifetime: &'static str)

Source from the content-addressed store, hash-verified

2543 }
2544
2545 fn print_borrowed_str(&mut self, lifetime: &'static str) {
2546 self.push_str("&");
2547 if lifetime != "'_" {
2548 self.push_str(lifetime);
2549 self.push_str(" ");
2550 }
2551 if self.r#gen.opts.raw_strings {
2552 self.push_str("[u8]");
2553 } else {
2554 self.push_str("str");
2555 }
2556 }
2557
2558 pub fn path_to_resource(&mut self) -> String {
2559 self.path_from_runtime_module(RuntimeItem::ResourceType, "Resource")

Callers 1

print_tyMethod · 0.80

Calls 1

push_strMethod · 0.45

Tested by

no test coverage detected