Expand description
Mutation behavior for the SIM runtime: cells, boxes, vectors, and tables.
The kernel defines the capability and operation contracts; this crate
supplies the concrete mutation organ (mutable cells, boxes, vectors, and
tables) guarded by a standard mutate capability. Every in-place write goes
through standard_mutate_capability so mutation stays auditable, and the
organ publishes its operation keys as claims via
publish_mutation_organ_claims.
See the crate README for where this organ sits in the constellation.
Structs§
- Cell
- A shared, mutable cell holding a single
Value. - Mutable
Box - A mutable box: a single-slot mutation handle over a
Cell. - Mutable
Table - A mutable, symbol-keyed table backing the kernel
Tablecontract. - Mutable
Vector - A growable, index-addressed vector of
Values with in-place mutation.
Functions§
- cell_
value - Construct a
Cellinitialized tovalueand wrap it as a runtimeValue. - mutable_
box_ value - Construct a
MutableBoxinitialized tovalueand wrap it as a runtimeValue. - mutable_
table - Construct a
MutableTablefromentriesand wrap it as a runtimeValue. - mutable_
table_ value - Borrow the
MutableTablebehindvalue, or error if it is not one. - mutable_
vector - Construct a
MutableVectorfromitemsand wrap it as a runtimeValue. - mutable_
vector_ from_ value - Build a
MutableVectorby copying the elements of a vector-shapedvalue. - mutable_
vector_ value - Borrow the
MutableVectorbehindvalue, or error if it is not one. - mutation_
box_ op_ key - Operation key for constructing a mutable box (
mutation/box). - mutation_
cell_ op_ key - Operation key for constructing a mutable cell (
mutation/cell). - mutation_
op_ keys - The full set of mutation operation keys this organ exposes.
- mutation_
organ_ symbol - The organ symbol under which this crate publishes its claims:
organ:mutation. - mutation_
set_ op_ key - Operation key for an in-place write (
mutation/set). - mutation_
table_ op_ key - Operation key for constructing a mutable table (
mutation/table). - mutation_
vector_ op_ key - Operation key for constructing a mutable vector (
mutation/vector). - publish_
mutation_ organ_ claims - Publish the mutation organ and its operation keys as claims into
cx. - publish_
mutation_ organ_ claims_ for_ lib - Publish the mutation organ claims as part of a loaded lib receipt.
- standard_
mutate_ capability - The capability name every mutation write requires:
standard.mutate.