Skip to main content

Module vocabulary

Module vocabulary 

Source
Expand description

Vocabulary domain shapes — shared across the client → action → render boundary for dsp vre vocabulary list / describe (DSP-API “list” / “list node”).

Types here are the dsp-cli vocabulary for DSP-API’s list/list-node wire shapes. Wire (de)serialization stays in src/client/http.rs; nothing here derives serde. See ADR-0001 and ADR-0008.

Structs§

LocalizedText
One language-tagged string, as DSP-API returns it in a list’s labels / comments. ALL languages are kept (plan 034 D4) — no preferred-language collapsing anywhere in this crate. language is None for DSP-API’s untagged PlainStringLiteralV2 variant (D9b).
Vocabulary
A vocabulary as shown by dsp vre vocabulary list — the lean list-index projection.
VocabularyDetail
What the ACTION hands the renderer for describe: the tree plus the render decisions only the action can make, because only it sees --subtree.
VocabularyHeader
Identity + labels of a vocabulary or one of its nodes. No children, no counts — those live on Vocabulary / VocabularyNode / VocabularyTree.
VocabularyNode
One node in a vocabulary’s tree, as returned by the DSP-API (position-sorted by the server; the client re-sorts defensively).
VocabularyTree
What the CLIENT returns from describe_vocabulary: a faithful, position-ordered tree plus the facts the wire response carried. Holds NO rendered-counts and no render decisions — structurally, since it has no such fields, the client cannot express them even by accident. VocabularyDetail is where those decisions live (Step 3’s layer-ownership split).