Skip to main content

Crate sim_lib_mutation

Crate sim_lib_mutation 

Source
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.
MutableBox
A mutable box: a single-slot mutation handle over a Cell.
MutableTable
A mutable, symbol-keyed table backing the kernel Table contract.
MutableVector
A growable, index-addressed vector of Values with in-place mutation.

Functions§

cell_value
Construct a Cell initialized to value and wrap it as a runtime Value.
mutable_box_value
Construct a MutableBox initialized to value and wrap it as a runtime Value.
mutable_table
Construct a MutableTable from entries and wrap it as a runtime Value.
mutable_table_value
Borrow the MutableTable behind value, or error if it is not one.
mutable_vector
Construct a MutableVector from items and wrap it as a runtime Value.
mutable_vector_from_value
Build a MutableVector by copying the elements of a vector-shaped value.
mutable_vector_value
Borrow the MutableVector behind value, 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.