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

Function to_rust_upper_camel_case

crates/wit-bindgen/src/rust.rs:480–487  ·  view source on GitHub ↗

Translate `name` to a Rust `UpperCamelCase` identifier.

(name: &str)

Source from the content-addressed store, hash-verified

478
479/// Translate `name` to a Rust `UpperCamelCase` identifier.
480pub fn to_rust_upper_camel_case(name: &str) -> String {
481 match name {
482 // We use `Host` as the name of the trait for host implementations
483 // to fill in, so rename it if "Host" is used as a regular identifier.
484 "host" => "Host_".into(),
485 s => s.to_upper_camel_case(),
486 }
487}

Callers 5

build_world_structMethod · 0.85
world_imports_traitMethod · 0.85
type_flagsMethod · 0.85
print_rust_enumMethod · 0.85
type_enumMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected