Loading...
Loading...
Compare original and translation side by side
/rust-symbol-analyzer [file.rs] [--type struct|trait|fn|mod]/rust-symbol-analyzer/rust-symbol-analyzer src/lib.rs/rust-symbol-analyzer --type trait/rust-symbol-analyzer [file.rs] [--type struct|trait|fn|mod]/rust-symbol-analyzer/rust-symbol-analyzer src/lib.rs/rust-symbol-analyzer --type traitLSP(
operation: "documentSymbol",
filePath: "src/lib.rs",
line: 1,
character: 1
)LSP(
operation: "documentSymbol",
filePath: "src/lib.rs",
line: 1,
character: 1
)LSP(
operation: "workspaceSymbol",
filePath: "src/lib.rs",
line: 1,
character: 1
)LSP(
operation: "workspaceSymbol",
filePath: "src/lib.rs",
line: 1,
character: 1
)User: "What's the structure of this project?"
│
▼
[1] Find all Rust files
Glob("**/*.rs")
│
▼
[2] Get symbols from each key file
LSP(documentSymbol) for lib.rs, main.rs
│
▼
[3] Categorize by type
│
▼
[4] Generate structure visualization用户: "这个项目的结构是什么样的?"
│
▼
[1] 查找所有Rust文件
Glob("**/*.rs")
│
▼
[2] 从关键文件中获取符号
对lib.rs、main.rs执行LSP(documentSymbol)
│
▼
[3] 按类型分类
│
▼
[4] 生成结构可视化结果undefinedundefinedundefinedundefinedundefinedundefined| Name | Location | Fields | Derives |
|---|---|---|---|
| Config | src/config.rs:10 | 5 | Debug, Clone |
| User | src/models/user.rs:8 | 4 | Debug, Serialize |
| Order | src/models/order.rs:15 | 6 | Debug, Serialize |
| ... |
| 名称 | 位置 | 字段 | 派生特性 |
|---|---|---|---|
| Config | src/config.rs:10 | 5 | Debug, Clone |
| User | src/models/user.rs:8 | 4 | Debug, Serialize |
| Order | src/models/order.rs:15 | 6 | Debug, Serialize |
| ... |
| Name | Location | Methods | Implementors |
|---|---|---|---|
| Handler | src/handlers/mod.rs:5 | 3 | AuthHandler, ApiHandler |
| Repository | src/db/mod.rs:12 | 5 | UserRepo, OrderRepo |
| ... |
| 名称 | 位置 | 方法 | 实现者 |
|---|---|---|---|
| Handler | src/handlers/mod.rs:5 | 3 | AuthHandler, ApiHandler |
| Repository | src/db/mod.rs:12 | 5 | UserRepo, OrderRepo |
| ... |
| Name | Location | Visibility | Async |
|---|---|---|---|
| main | src/main.rs:10 | pub | yes |
| parse_config | src/config.rs:45 | pub | no |
| ... |
| 名称 | 位置 | 可见性 | 是否异步 |
|---|---|---|---|
| main | src/main.rs:10 | pub | 是 |
| parse_config | src/config.rs:45 | pub | 否 |
| ... |
| Name | Location | Variants |
|---|---|---|
| Error | src/error.rs:5 | 8 |
| Status | src/models/order.rs:5 | 4 |
| ... |
undefined| 名称 | 位置 | 变体 |
|---|---|---|
| Error | src/error.rs:5 | 8 |
| Status | src/models/order.rs:5 | 4 |
| ... |
undefinedundefinedundefinedundefinedundefinedundefinedundefined| File | Structs | Functions | Lines | Complexity |
|---|---|---|---|---|
| src/handlers/auth.rs | 2 | 8 | 150 | Medium |
| src/models/user.rs | 3 | 12 | 200 | High |
| src/config.rs | 1 | 3 | 50 | Low |
undefined| 文件 | 结构体数量 | 函数数量 | 行数 | 复杂度 |
|---|---|---|---|---|
| src/handlers/auth.rs | 2 | 8 | 150 | 中等 |
| src/models/user.rs | 3 | 12 | 200 | 高 |
| src/config.rs | 1 | 3 | 50 | 低 |
undefinedundefinedundefinedundefinedundefined| Type | Icon | LSP Kind |
|---|---|---|
| Module | 📦 | Module |
| Struct | 🏗️ | Struct |
| Enum | 🔢 | Enum |
| Trait | 📜 | Interface |
| Function | ⚡ | Function |
| Method | 🔧 | Method |
| Constant | 🔒 | Constant |
| Field | 📎 | Field |
| 类型 | 图标 | LSP 类型 |
|---|---|---|
| 模块 | 📦 | Module |
| 结构体 | 🏗️ | Struct |
| 枚举 | 🔢 | Enum |
| Trait | 📜 | Interface |
| 函数 | ⚡ | Function |
| 方法 | 🔧 | Method |
| 常量 | 🔒 | Constant |
| 字段 | 📎 | Field |
| User Says | Analysis |
|---|---|
| "What structs are in this project?" | workspaceSymbol + filter |
| "Show me src/lib.rs structure" | documentSymbol |
| "Find all async functions" | workspaceSymbol + async filter |
| "List public API" | documentSymbol + pub filter |
| 用户提问 | 分析操作 |
|---|---|
| "这个项目里有哪些结构体?" | workspaceSymbol + 过滤 |
| "展示src/lib.rs的结构" | documentSymbol |
| "查找所有异步函数" | workspaceSymbol + 异步过滤 |
| "列出公开API" | documentSymbol + pub过滤 |
| When | See |
|---|---|
| Navigate to symbol | rust-code-navigator |
| Call relationships | rust-call-graph |
| Trait implementations | rust-trait-explorer |
| Safe refactoring | rust-refactor-helper |
| 场景 | 查看 |
|---|---|
| 跳转到符号 | rust-code-navigator |
| 调用关系 | rust-call-graph |
| Trait实现 | rust-trait-explorer |
| 安全重构 | rust-refactor-helper |