This library is in flux. APIs may change without notice. Generated from source with koruc 0.1.7 on 9/16/2026.
Store.clear
~import std/store.clearKoru Standard Library: Reactive Stores — the `clear` event.
store.clear.kz · 1 tors
Koru Standard Library: Reactive Stores — the `clear` event. · 17 more lines
Koru Standard Library: Reactive Stores — the `clear` event.
Joined via `~part clear` in store.kz; merged into the store module at load.
std/store:clear(s) — empty a plural store in ONE step.
The bulk twin of `take`. Where `take` removes one row and fires `removed`,
`clear` removes every row and fires `cleared` once. Each removal verb has
its own arm; neither fires the other's, which is what lets a bulk removal
stay bulk instead of degenerating into a thousand per-row events.
Outstanding handles go stale across it (the generation of every live slot is
bumped), so the stale-handle trap 690_115 pins still fires afterwards.
Refused where the meaning would be ambiguous rather than guessed at: a store
with owned columns keeps `take` plus `! discharge` (obligations discharge one
at a time, and a bulk reset would drop them silently), and a store with a
`! removed` arm must declare `! cleared` to say what the aggregate means.
// Koru Standard Library: Reactive Stores — the `clear` event.
// Joined via `~part clear` in store.kz; merged into the store module at load.
//
// std/store:clear(s) — empty a plural store in ONE step.
//
// The bulk twin of `take`. Where `take` removes one row and fires `removed`,
// `clear` removes every row and fires `cleared` once. Each removal verb has
// its own arm; neither fires the other's, which is what lets a bulk removal
// stay bulk instead of degenerating into a thousand per-row events.
//
// Outstanding handles go stale across it (the generation of every live slot is
// bumped), so the stale-handle trap 690_115 pins still fires afterwards.
//
// Refused where the meaning would be ambiguous rather than guessed at: a store
// with owned columns keeps `take` plus `! discharge` (obligations discharge one
// at a time, and a bulk reset would drop them silently), and a store with a
// `! removed` arm must declare `! cleared` to say what the aggregate means.
~[keyword|comptime|transform] pub tor clear {
expr: Expression,
invocation: *const Invocation,
item: std/compiler:*const Item,
program: std/compiler:*const Program,
reporter: std/compiler:*ErrorReporter,
allocator: std.mem.Allocator
} -> SiteResult