Skip to content
Konjure / spatial intelligence

query

← Builtin reference

Returns entity identities that have the selected type or implement the selected trait.

Signature

func query[C]() -> List[Entity]

C means a concrete type or trait selector. The returned entity handles are ordered by creation and are a snapshot value; later lifecycle changes do not mutate the returned list.

Returns

List[Entity]

Matching entities in stable creation order.

Examples

Query matching entities

The selector makes the query function value concrete.

Tick 0 · 0.00 s⌘ / Ctrl + EnterThis device
main.kj
Loading the language runtime…
Output 0
No output.
Expected output
1

Rust definition

Rust interpreter builtin dispatch; C is a checked concrete type or trait selector.

See also