MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / handlerSite

Function handlerSite

src/resolution/frameworks/rust.ts:103–106  ·  view source on GitHub ↗
(exprEnd: number, expr: string, handler: string)

Source from the content-addressed store, hash-verified

101 // ending at `exprEnd`: the Rust scope gate reads the reference's line, and
102 // rustfmt wraps a long `.route(` call so its handler sits below it (#2326).
103 const handlerSite = (exprEnd: number, expr: string, handler: string) => {
104 const offset = exprEnd - expr.length + expr.lastIndexOf(handler);
105 return { line: safe.slice(0, offset).split('\n').length, column: offset - safe.lastIndexOf('\n', offset - 1) - 1 };
106 };
107
108 // Actix-web / Rocket attribute: #[get("/path")] fn handler(..)
109 // Capture the method, path, and the fn identifier that follows.

Callers 2

extractFunction · 0.85
pushActixRouteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected