Inspects an already open file.
(file: &ParcodeFile)
| 56 | impl ParcodeInspector { |
| 57 | /// Inspects an already open file. |
| 58 | pub fn inspect_file(file: &ParcodeFile) -> Result<DebugReport> { |
| 59 | let root = file.root_node()?; |
| 60 | let tree = Self::inspect_node(&root)?; |
| 61 | |
| 62 | Ok(DebugReport { |
| 63 | file_size: file.file_size(), |
| 64 | root_offset: root.offset(), |
| 65 | global_version: 4, |
| 66 | tree, |
| 67 | }) |
| 68 | } |
| 69 | |
| 70 | /// Convenience wrapper to inspect from path. |
| 71 | pub fn inspect<P>(path: P) -> Result<DebugReport> |