Module obj

Module obj 

Source
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 WaveObj for a struct that has standard fields: oid: String, version: i64, meta: MetaMapType.

Structs§

Block
Go: Block in pkg/obj/wtype.go
BlockDef
Client
Go: Client in pkg/obj/wtype.go
FileDef
LayoutActionData
LayoutNode
One node in the layout tree. Stable UUID-keyed; size is a relative flex unit; children form the recursive structure (empty for leaves).
LayoutNodeData
Leaf-only payload — references the block this layout leaf renders. Group nodes (those with children) carry no data.
LayoutState
Go: LayoutState in pkg/obj/wtype.go
LeafOrderEntry
Point
RuntimeOpts
StickerClickOpts
StickerDisplayOpts
StickerType
Tab
Go: Tab in pkg/obj/wtype.go
TermSize
UIContext
WaveObjUpdate
Represents an update notification for a wave object. Matches Go’s WaveObjUpdate.
WinSize
Window
Go: Window in pkg/obj/wtype.go
Workspace
Go: Workspace in pkg/obj/wtype.go
WorkspaceListEntry
Go: WorkspaceListEntry in pkg/obj/wtype.go Used by ListWorkspaces — returns just {workspaceid, windowid}, not full workspace objects.

Enums§

FlexDirection
Direction children flow within a layout node (row = horizontal split, column = vertical split). Defaults to Row when 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 WaveObj interface. 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 update into base, matching Go’s MergeMeta logic.
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§

MetaMapType
Matches Go’s MetaMapType = map[string]any.