Expand description
WaveObj types: Rust equivalents of Go structs from pkg/obj/wtype.go.
All #[serde(rename = "...")] tags match Go JSON tags for wire compatibility.
Macros§
- impl_
wave_ 🔒obj - Macro that implements
WaveObjfor a struct that has standard fields:oid: String,version: i64,meta: MetaMapType.
Structs§
- Block
- Go:
Blockin pkg/obj/wtype.go - Block
Def - Client
- Go:
Clientin pkg/obj/wtype.go - FileDef
- Layout
Action Data - Layout
Node - One node in the layout tree. Stable UUID-keyed;
sizeis a relative flex unit;childrenform the recursive structure (empty for leaves). - Layout
Node Data - Leaf-only payload — references the block this layout leaf renders.
Group nodes (those with
children) carry nodata. - Layout
State - Go:
LayoutStatein pkg/obj/wtype.go - Leaf
Order Entry - Point
- Runtime
Opts - Sticker
Click Opts - Sticker
Display Opts - Sticker
Type - Tab
- Go:
Tabin pkg/obj/wtype.go - Term
Size - UIContext
- Wave
ObjUpdate - Represents an update notification for a wave object.
Matches Go’s
WaveObjUpdate. - WinSize
- Window
- Go:
Windowin pkg/obj/wtype.go - Workspace
- Go:
Workspacein pkg/obj/wtype.go - Workspace
List Entry - Go:
WorkspaceListEntryin pkg/obj/wtype.go Used by ListWorkspaces — returns just {workspaceid, windowid}, not full workspace objects.
Enums§
- Flex
Direction - Direction children flow within a layout node (row = horizontal split,
column = vertical split). Defaults to
Rowwhen absent in JSON for tolerance of older blobs.
Constants§
- OTYPE_
BLOCK - OTYPE_
CLIENT - OTYPE_
LAYOUT - OTYPE_
TAB - OTYPE_
TEMP - OTYPE_
WINDOW - OTYPE_
WORKSPACE - UPDATE_
TYPE_ DELETE - UPDATE_
TYPE_ UPDATE - VALID_
OTYPES
Traits§
- WaveObj
- Rust equivalent of Go’s
WaveObjinterface. Every wave object has an otype, an OID, a version, and metadata.
Functions§
- deserialize_
meta_ 🔒or_ null - is_
default_ 🔒term_ size - is_
default_ 🔒win_ size - is_
zero_ 🔒i64 - merge_
meta - Merge
updateintobase, matching Go’sMergeMetalogic. - meta_
get_ bool - Helper to get a bool value from MetaMapType.
- meta_
get_ string - Helper to get a string value from MetaMapType.
- serialize_
meta_ 🔒as_ null_ if_ empty - wave_
obj_ from_ json - Deserialize JSON bytes to a specific WaveObj type. Does NOT validate the otype field — caller should verify if needed.
- wave_
obj_ to_ json - Serialize any WaveObj to JSON bytes, including the “otype” field.
This matches Go’s
obj.ToJson(). - wave_
obj_ to_ value - Serialize any WaveObj to a serde_json::Value, including the “otype” field.
This matches Go’s
obj.ToJsonMap()— used by GetObject/GetObjects responses.
Type Aliases§
- Meta
MapType - Matches Go’s
MetaMapType = map[string]any.