( method: RpcMethod, resultSchema: JSONSchema7 | undefined, paramsDescription: string | undefined, includeParams: boolean, )
| 591 | } |
| 592 | |
| 593 | function rustRpcMethodDocs( |
| 594 | method: RpcMethod, |
| 595 | resultSchema: JSONSchema7 | undefined, |
| 596 | paramsDescription: string | undefined, |
| 597 | includeParams: boolean, |
| 598 | ): string[] { |
| 599 | const docs: string[] = []; |
| 600 | pushRustDoc(docs, method.description ?? `Calls \`${method.rpcMethod}\`.`, " "); |
| 601 | docs.push(" ///"); |
| 602 | docs.push(` /// Wire method: \`${method.rpcMethod}\`.`); |
| 603 | if (includeParams && paramsDescription) { |
| 604 | docs.push(" ///"); |
| 605 | docs.push(" /// # Parameters"); |
| 606 | docs.push(" ///"); |
| 607 | pushRustDoc(docs, `* \`params\` - ${paramsDescription}`, " "); |
| 608 | } |
| 609 | const resultDescription = rustRpcResultDescription(method, resultSchema); |
| 610 | if (resultDescription) { |
| 611 | docs.push(" ///"); |
| 612 | docs.push(" /// # Returns"); |
| 613 | docs.push(" ///"); |
| 614 | pushRustDoc(docs, resultDescription, " "); |
| 615 | } |
| 616 | return docs; |
| 617 | } |
| 618 | |
| 619 | // ── Type resolution ───────────────────────────────────────────────────────── |
| 620 |
no test coverage detected
searching dependent graphs…