type
ChildrenDraft
ChildrenDraft owns a detached slice. Committing snapshots again, so retained drafts cannot mutate published graphs. Structural edits are explicit.
Full signature
type ChildrenDraft struct{ fields Fields }Methods
ChildrenDraft.EditBlock()Public method ChildrenDraft.EditBlock from github.com/riducms/ridu/field.
ChildrenDraft.EditBranch()EditBranch targets an explicit object, row, block case, tab or embedded case.
ChildrenDraft.EditBranchAt()EditBranchAt addresses a layout by its authored position when names are absent or ambiguous. The selector still identifies a structural boundary.
ChildrenDraft.EditChildren()EditChildren targets the one direct children branch of an object/array/layout. Blocks, tabs and embedded payloads require their explicit branch selector.
ChildrenDraft.EditNumber()EditNumber refines a known numeric node and diagnoses incompatible kinds.
ChildrenDraft.EditNumberList()EditNumberList refines a direct primitive-list child while preserving its policies.
ChildrenDraft.EditText()EditText refines the actual node, preserving hidden attachments.
ChildrenDraft.EditTextList()EditTextList refines a direct primitive-list child while preserving its policies.
ChildrenDraft.Fields()Fields returns a detached inspection snapshot of the draft's current state.
ChildrenDraft.Insert()Public method ChildrenDraft.Insert from github.com/riducms/ridu/field.
ChildrenDraft.Remove()Public method ChildrenDraft.Remove from github.com/riducms/ridu/field.
ChildrenDraft.Rename()Rename changes one direct local name. Sibling references in this same stored scope are rebound explicitly; root references require RenameRoot at the root. Calling Rename on a facade merely changes that value's own name.
ChildrenDraft.RenameRoot()RenameRoot is the explicit root edit that also rewrites root selectors in descendants. It must be used on the resource's root draft.
ChildrenDraft.Replace()Replace deliberately replaces a whole node, including behavior and kind.
ChildrenDraft.ReplaceAt()ReplaceAt deliberately replaces an authored child position, including unnamed or same-named layout wrappers. It never merges or reconstructs a node.