sim_lib_mutation/
claims.rs1use sim_kernel::{
2 Cx, LibId, OpKey, Result, Symbol,
3 standard::{publish_organ_claims, publish_organ_claims_for_lib},
4};
5
6pub fn mutation_organ_symbol() -> Symbol {
8 Symbol::qualified("organ", "mutation")
9}
10
11pub fn mutation_cell_op_key() -> OpKey {
13 mutation_op_key("cell")
14}
15
16pub fn mutation_box_op_key() -> OpKey {
18 mutation_op_key("box")
19}
20
21pub fn mutation_set_op_key() -> OpKey {
23 mutation_op_key("set")
24}
25
26pub fn mutation_vector_op_key() -> OpKey {
28 mutation_op_key("vector")
29}
30
31pub fn mutation_table_op_key() -> OpKey {
33 mutation_op_key("table")
34}
35
36pub fn mutation_op_keys() -> Vec<OpKey> {
41 [
42 mutation_cell_op_key(),
43 mutation_box_op_key(),
44 mutation_set_op_key(),
45 mutation_vector_op_key(),
46 mutation_table_op_key(),
47 ]
48 .into()
49}
50
51pub fn publish_mutation_organ_claims(cx: &mut Cx) -> Result<()> {
57 publish_organ_claims(cx, mutation_organ_symbol(), mutation_op_keys())
58}
59
60pub fn publish_mutation_organ_claims_for_lib(cx: &mut Cx, lib_id: LibId) -> Result<()> {
62 publish_organ_claims_for_lib(cx, lib_id, mutation_organ_symbol(), mutation_op_keys())
63}
64
65fn mutation_op_key(name: &str) -> OpKey {
66 OpKey::new(Symbol::new("mutation"), Symbol::new(name), 1)
67}