Skip to main content

sim_lib_mutation/
lib.rs

1#![forbid(unsafe_code)]
2#![deny(missing_docs)]
3//! Mutation behavior for the SIM runtime: cells, boxes, vectors, and tables.
4//!
5//! The kernel defines the capability and operation contracts; this crate
6//! supplies the concrete mutation organ (mutable cells, boxes, vectors, and
7//! tables) guarded by a standard mutate capability. Every in-place write goes
8//! through [`standard_mutate_capability`] so mutation stays auditable, and the
9//! organ publishes its operation keys as claims via
10//! [`publish_mutation_organ_claims`].
11//!
12//! See the crate [README] for where this organ sits in the constellation.
13//!
14//! [README]: https://github.com/sim-nest/sim-runtime
15
16mod cap;
17mod cell;
18mod claims;
19mod table;
20mod vector;
21
22pub use cap::standard_mutate_capability;
23pub use cell::{Cell, MutableBox, cell_value, mutable_box_value};
24pub use claims::{
25    mutation_box_op_key, mutation_cell_op_key, mutation_op_keys, mutation_organ_symbol,
26    mutation_set_op_key, mutation_table_op_key, mutation_vector_op_key,
27    publish_mutation_organ_claims, publish_mutation_organ_claims_for_lib,
28};
29pub use table::{MutableTable, mutable_table, mutable_table_value};
30pub use vector::{MutableVector, mutable_vector, mutable_vector_from_value, mutable_vector_value};
31
32#[cfg(test)]
33mod tests;