method

BlockRegistry.BindAt

BindAt is Bind with the resource's authored path in diagnostics. Inline declarations are interned into the registry: a slug declared before must have an identical declaration, or binding fails naming both.

Arguments

ArgumentTypeDescription
fieldsFieldsThe fields value.
pathstringThe path value.

Returns

The declared result.

(Fields, error)

Full signature

func (r *BlockRegistry) BindAt( fields Fields, path string, ) (Fields, error)

Source field/block_registry.go:108

Related types

  • BlockRegistry

    BlockRegistry owns the block definitions of one configuration, one per slug. Blocks registered centrally and blocks declared inline in a Blocks field or an embedded tree case are the same kind of definition: binding interns every inline declaration by slug, so each definition is bound once and shared by all of its placements. Bound containers select their definitions by slug and do not grant a placement mutation rights over a shared definition.

  • Fields

    Fields is the ordered list assigned to ridu.Collection.Fields, ridu.Global.Fields, or a nested field constructor. Populate it with Nodes from this package's constructors. Ridu snapshots the caller-owned slice during construction, editing, and config resolution.