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

Function toRustFieldName

scripts/codegen/rust.ts:138–140  ·  view source on GitHub ↗

Convert a JSON property name (camelCase) to a Rust field name (snake_case).

(jsonName: string)

Source from the content-addressed store, hash-verified

136
137/** Convert a JSON property name (camelCase) to a Rust field name (snake_case). */
138function toRustFieldName(jsonName: string): string {
139 return toSnakeCase(jsonName);
140}
141
142/** Convert snake_case back to camelCase (matches serde's rename_all = "camelCase"). */
143function snakeToCamelCase(snake: string): string {

Callers 2

safeRustFieldNameFunction · 0.85
emitRustStructFunction · 0.85

Calls 1

toSnakeCaseFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…