Skip to main content

Crate sim_lib_mutation

Crate sim_lib_mutation 

Source
Expand description

Mutation behavior for the SIM runtime: cells, boxes, vectors, tables, and a bounded managed-object arena.

The kernel defines the capability and operation contracts; this crate supplies the concrete mutation organ (mutable cells, boxes, vectors, symbol-keyed tables, and runtime-keyed 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.
CollectionMutationReceipt
Atomic collector mutation evidence.
EdgeId
Stable identity of an edge within its owning object.
HardCappedRetainPolicy
The only built-in policy: retain objects until explicit teardown, while refusing allocations beyond a fixed hard cap.
ManagedArena
Bounded storage for managed objects, independent of language and collector policy.
ManagedHandle
An object handle. It does not itself keep the object rooted.
ManagedId
A stable managed-object identity assigned from allocation order.
MutableBox
A mutable box: a single-slot mutation handle over a Cell.
MutableRuntimeTable
A mutable table keyed by arbitrary runtime values.
MutableTable
A mutable, symbol-keyed table backing the kernel Table contract.
MutableVector
A growable, index-addressed vector of Values with in-place mutation.
PrimitiveRuntimeKeyPolicy
A small reusable key policy for languages that accept primitive keys and object identity.
RootId
A stable identity for one root registration.
RootedHandle
A registered root handle. Dropping this value does not mutate the arena; callers explicitly release it so root changes remain transactional.
SafepointReceipt
Deterministic evidence for one tracing safepoint.
TeardownReceipt
Deterministic evidence returned by explicit arena teardown.
TraceSnapshot
An immutable, complete tracing view taken at a safepoint.
WeakHandle
A non-rooting object handle which may become stale.

Enums§

ArenaError
Fail-closed arena operation errors.
RuntimeKey
A table key derived from a runtime value rather than a kernel Symbol.
TraceContractVersion
The tracing ABI understood by this arena.

Statics§

RECIPES
Cookbook recipes for this lib, embedded at build time.

Traits§

EdgeVisitor
Receives every outgoing managed edge of an object.
ManagedObject
An object stored by ManagedArena.
RuntimeKeyPolicy
Maps a language value to a runtime table key.

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_runtime_table
Constructs a MutableRuntimeTable and wraps it as a runtime Value.
mutable_runtime_table_value
Borrows a MutableRuntimeTable with policy P from 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.