Skip to main content

Module view

Module view 

Source
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
  • EditCommand is 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 4
  • ValidationReport { 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§

ApplyResult
Outcome of a successful apply.
ConfigFileView
One TOML file inside the workspace.
ConfigNodeView
One editable value inside a ConfigFileView.
Diagnostic
Human-readable notice about the workspace.
DiffItem
One summary row in a SaveResult::diff_summary.
NodeId
Stable identifier for an editable node.
NodeValidation
Per-node validation result.
ReloadHint
Advisory indicating what, if anything, the server needs to do in response to a config change.
RespondPayload
Payload for UpdateRespond.
RulePayload
Payload for AddRule / UpdateRule.
SaveResult
Outcome of Workspace::save.
ValidationIssue
ValidationReport
Workspace-wide validation result. Mirrors spec §4.6.
WorkspaceSnapshot
Complete snapshot of the workspace state.

Enums§

ConfigFileKind
DiffKind
EditCommand
Structured edit command applied via Workspace::apply.
EditValue
Value provided with an edit command.
NodeKind
What shape of value a node holds. The variants are what the spec-defined EditCommand variants act on.
RootSettingKey
Enumerated root-level setting. Typed enum rather than free-form path so the apply-layer can exhaustively match without parsing.
Severity