Skip to main content

Module store_ops

Module store_ops 

Source
Expand description

#611: the enumerable storage-operation registry.

The entry operations of the store kinds (Cell/Map/Set/Cache/ Log) are dispatched by the checker in crate::checker’s check_store_*_op functions, where the operation names live in match arms — authoritative for typing, but not enumerable. This module is the enumerable view the LSP reads for hover on a store operation, mirroring crate::kernel_methods’s relationship to the value-kernel dispatch.

The signatures are human-readable Bynk-surface display strings, generic in the kind’s element/key/value type (K/V/T — the store field’s declared kind grounds them at the hover site).

What the drift test pins, and what it does not. store_op_registry_pins_dispatch drives every listed operation through the real checker on a store field of the matching kind and asserts none is rejected as unknown_op — so the table cannot list a phantom operation. It does not bite the other way: an operation added to a check_store_*_op arm later fails nothing here, and this table will silently under-list it (hover then falls through — a missing hover, not a wrong one). Nor does it check the signature strings, which are display-only and unread by the checker; those are pinned by eye against the check_store_*_op arms. crate::kernel_methods has the same shape and the same two limits.

Structs§

StoreOp
One storage operation: its name and a display signature.

Constants§

CACHE_STORE_OPS
store Cache[K, V] (v0.87, ADR 0113) — the storage Map’s operation set, but its own table rather than an alias: every operation but remove applies TTL expiry, which reads the clock, so the handler must declare given Clock. That requirement is part of the operation’s contract, so it is rendered in the signature (as a handler’s own given clause is written, after the return type) — an alias to MAP_STORE_OPS would silently drop it.
CELL_STORE_OPS
store Cell[T] (v0.98, ADR 0125) — update is the only method-shaped operation; a cell is read by its bare name and written with :=.
LOG_STORE_OPS
store Log[T] (v0.95, ADR 0121) — append is the one effectful write; the time-window roots are lazy Query[T] builders. The general query vocabulary the roots feed into is the kernel Query surface, not a Log operation, so it is not listed here.
MAP_QUERY_ACCESSORS
The .entries/.keys/.values lazy query accessors a store Map[K, V] field exposes (v0.158, ADR 0184) — fields, not method calls, so they’re dispatched in crate::checker::expressions::check_field_access rather than a check_store_*_op function, and are a separate table from MAP_STORE_OPS though they share a receiver. Never offered on a held Map[K, Connection] (bynk.held.query_accessor_on_held_map) — this static table doesn’t carry the value type, so callers gate that themselves.
MAP_STORE_OPS
store Map[K, V] (v0.82, ADR 0110) — entry-level and effectful.
SET_STORE_OPS
store Set[T] (v0.83) — entry-level and effectful. Set algebra (union/intersection/difference) is deferred.

Functions§

ops_for
The operations of the storage kind named head (a StoreKind’s head identifier — "Map", "Cell", …). Queue is in the storage-kind catalogue but has no dispatched operations yet, so it — like an unknown head — yields none.