MCPcopy Index your code
hub / github.com/github/copilot-sdk / toRustPascalIdentifier

Function toRustPascalIdentifier

scripts/codegen/rust.ts:101–110  ·  view source on GitHub ↗
(value: string, fallback: string)

Source from the content-addressed store, hash-verified

99}
100
101function toRustPascalIdentifier(value: string, fallback: string): string {
102 let identifier = toPascalCase(value);
103 if (!identifier) {
104 identifier = fallback;
105 } else if (!/^[A-Za-z_]/.test(identifier)) {
106 identifier = `${fallback}${identifier}`;
107 }
108
109 return RUST_KEYWORDS.has(identifier) ? `${identifier}Value` : identifier;
110}
111
112function uniqueRustPascalIdentifier(
113 value: string,

Callers 2

emitRustConstStringEnumFunction · 0.85

Calls 1

toPascalCaseFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…