nustack

collection

Shape-domain Collection Form chain.

Module nu.domains.shape.forms.collection.

Shape-domain Collection Form chain.

Pure Form mixins: no Ref or substrate knowledge. They sit BETWEEN the generic collection forms and the concrete Refs, adding shape-domain ops (existence checks, fabric-level set/erase, tree-aware observation) on top of whatever generic collection surface the Ref already exposes.

on_change() (observe self) is deliberately absent here. It is generic and lives on the generic ReactiveXxxForm tiers in nu.forms.collections.abc, returning nu.core.reactive.OnChange. ReactiveCollectionForm provides only the three tree-aware methods, which reach for the shape-tier counterparts in nu.core.reactive too: one unified location for every reactive query.

NameCallMeaning
CollectionFormCollectionForm()Shape collection Form. Ops: exists(), missing(), extract().
MutableCollectionFormMutableCollectionForm()Mutable shape collection Form. Adds set(value) and erase().
ReactiveCollectionFormReactiveCollectionForm()Reactive shape collection Form. Adds tree-aware observation.

CollectionForm

Shape collection Form. Ops: exists(), missing(), extract().

CollectionForm()

Path nu.domains.shape.forms.CollectionForm.

Methods

.exists()

Build an Exists query.

Builds Exists.

Undocumented: example.

.missing()

Build a Missing query.

Builds Missing.

Undocumented: example.

.extract()

Build an Extract query.

Builds Extract.

Undocumented: example.

Inherited methods

From nu.lang.forms.Form:

CallBuildsMeaning
.is_empty()BoolTrue if this Form yields the EMPTY sentinel.
.is_invalid()BoolTrue if this Form yields the INVALID sentinel.
.is_sentinel()BoolTrue if this Form yields either sentinel (EMPTY or INVALID).
.not_empty()BoolTrue if this Form does not yield EMPTY.
.not_invalid()BoolTrue if this Form does not yield INVALID.

From builtins.object:

CallBuildsMeaning
a < bReturn self<value.
a <= bReturn self<=value.
a == bReturn self==value.
a != bReturn self!=value.
a > bReturn self>value.
a >= bReturn self>=value.

Undocumented: example.

MutableCollectionForm

Mutable shape collection Form. Adds set(value) and erase().

MutableCollectionForm()

Path nu.domains.shape.forms.MutableCollectionForm.

Methods

.set(value)

Build a SetCmd.

Builds SetCmd.

Arguments

NameTypeDefaultMeaning
valueobject

Undocumented: example.

.erase()

Build an Erase.

Builds Erase.

Undocumented: example.

.init(value)

Set value iff the collection is currently missing.

Builds IfDo.

Arguments

NameTypeDefaultMeaning
valueobject

Undocumented: example.

Inherited methods

From nu.domains.shape.forms.collection.CollectionForm:

CallBuildsMeaning
.exists()ExistsBuild an Exists query.
.missing()MissingBuild a Missing query.
.extract()ExtractBuild an Extract query.

From nu.lang.forms.Form:

CallBuildsMeaning
.is_empty()BoolTrue if this Form yields the EMPTY sentinel.
.is_invalid()BoolTrue if this Form yields the INVALID sentinel.
.is_sentinel()BoolTrue if this Form yields either sentinel (EMPTY or INVALID).
.not_empty()BoolTrue if this Form does not yield EMPTY.
.not_invalid()BoolTrue if this Form does not yield INVALID.

From builtins.object:

CallBuildsMeaning
a < bReturn self<value.
a <= bReturn self<=value.
a == bReturn self==value.
a != bReturn self!=value.
a > bReturn self>value.
a >= bReturn self>=value.

Undocumented: example.

ReactiveCollectionForm

Reactive shape collection Form. Adds tree-aware observation.

ReactiveCollectionForm()

Path nu.domains.shape.forms.ReactiveCollectionForm.

on_change() (observe self) is intentionally absent. It is generic and supplied by the generic ReactiveXxxForm tier via MRO.

Methods

.on_child_change(address)

Observe changes at a specific child address.

Builds OnChildChange.

Arguments

NameTypeDefaultMeaning
addressobject

Undocumented: example.

.on_children_change()

Observe changes across all direct children.

Builds OnChildrenChange.

Undocumented: example.

.on_descendants_change()

Observe changes across descendants matching pattern.

Builds OnDescendantsChange.

Undocumented: example.

Inherited methods

From nu.domains.shape.forms.collection.MutableCollectionForm:

CallBuildsMeaning
.set(value)SetCmdBuild a SetCmd.
.erase()EraseBuild an Erase.
.init(value)IfDoSet value iff the collection is currently missing.

From nu.domains.shape.forms.collection.CollectionForm:

CallBuildsMeaning
.exists()ExistsBuild an Exists query.
.missing()MissingBuild a Missing query.
.extract()ExtractBuild an Extract query.

From nu.lang.forms.Form:

CallBuildsMeaning
.is_empty()BoolTrue if this Form yields the EMPTY sentinel.
.is_invalid()BoolTrue if this Form yields the INVALID sentinel.
.is_sentinel()BoolTrue if this Form yields either sentinel (EMPTY or INVALID).
.not_empty()BoolTrue if this Form does not yield EMPTY.
.not_invalid()BoolTrue if this Form does not yield INVALID.

From builtins.object:

CallBuildsMeaning
a < bReturn self<value.
a <= bReturn self<=value.
a == bReturn self==value.
a != bReturn self!=value.
a > bReturn self>value.
a >= bReturn self>=value.

Undocumented: example.

On this page