Expand description
Read-only views on workspace state, and the command + result types the editing API uses.
§5.1.0 — spec alignment
In 5.0.0 this module carried a placeholder shape defined only by rustdoc; 5.1.0 re-aligns it with the 5.1 spec:
WorkspaceSnapshot { files, routes, diagnostics }(spec §4.2)- each node carries
id: NodeId+source_file+toml_path+display_name+kind+validation EditCommandis eight variants covering every editable action (spec §4.3)ApplyResult { changed_nodes, diagnostics, requires_reload }(spec §4.4)SaveResult { changed_files, diff_summary, requires_reload }(spec §4.5) — populated in Step 4ValidationReport { diagnostics, is_valid }(spec §4.6)Diagnostic { node_id, file, severity, message }(spec §4.7)
§Why UUIDs and not positional IDs
The spec’s §4.3 says “すべて NodeId で対象を指定”. Positional IDs
(rule_sets[0].rules[3]) would shift on every insert / delete /
move, forcing the GUI to re-index its selection set after every
edit. UUIDs are stable within a Workspace instance regardless of
reordering.
Structs§
- Apply
Result - Outcome of a successful
apply. - Config
File View - One TOML file inside the workspace.
- Config
Node View - One editable value inside a
ConfigFileView. - Diagnostic
- Human-readable notice about the workspace.
- Diff
Item - One summary row in a
SaveResult::diff_summary. - NodeId
- Stable identifier for an editable node.
- Node
Validation - Per-node validation result.
- Reload
Hint - Advisory indicating what, if anything, the server needs to do in response to a config change.
- Respond
Payload - Payload for
UpdateRespond. - Rule
Payload - Payload for
AddRule/UpdateRule. - Save
Result - Outcome of
Workspace::save. - Validation
Issue - Validation
Report - Workspace-wide validation result. Mirrors spec §4.6.
- Workspace
Snapshot - Complete snapshot of the workspace state.
Enums§
- Config
File Kind - Diff
Kind - Edit
Command - Structured edit command applied via
Workspace::apply. - Edit
Value - Value provided with an edit command.
- Node
Kind - What shape of value a node holds. The variants are what the
spec-defined
EditCommandvariants act on. - Root
Setting Key - Enumerated root-level setting. Typed enum rather than free-form path so the apply-layer can exhaustively match without parsing.
- Severity