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

Function collectNonDefaultableRustTypeNames

scripts/codegen/rust.ts:1274–1282  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

1272}
1273
1274function collectNonDefaultableRustTypeNames(code: string): Set<string> {
1275 const names = new Set<string>();
1276 const pattern =
1277 /#\[derive\(Debug, Clone, Serialize, Deserialize\)\](?:\r?\n#\[serde\([^\n]+\)\])*\r?\npub (?:struct|enum) (\w+)/g;
1278 for (const match of code.matchAll(pattern)) {
1279 names.add(match[1]);
1280 }
1281 return names;
1282}
1283
1284// ── API types generation ────────────────────────────────────────────────────
1285

Callers 1

generateFunction · 0.85

Calls 1

addMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…