use sim_kernel::{
Cx, LibId, OpKey, Result, Symbol,
standard::{publish_organ_claims, publish_organ_claims_for_lib},
};
pub fn mutation_organ_symbol() -> Symbol {
Symbol::qualified("organ", "mutation")
}
pub fn mutation_cell_op_key() -> OpKey {
mutation_op_key("cell")
}
pub fn mutation_box_op_key() -> OpKey {
mutation_op_key("box")
}
pub fn mutation_set_op_key() -> OpKey {
mutation_op_key("set")
}
pub fn mutation_vector_op_key() -> OpKey {
mutation_op_key("vector")
}
pub fn mutation_table_op_key() -> OpKey {
mutation_op_key("table")
}
pub fn mutation_op_keys() -> Vec<OpKey> {
[
mutation_cell_op_key(),
mutation_box_op_key(),
mutation_set_op_key(),
mutation_vector_op_key(),
mutation_table_op_key(),
]
.into()
}
pub fn publish_mutation_organ_claims(cx: &mut Cx) -> Result<()> {
publish_organ_claims(cx, mutation_organ_symbol(), mutation_op_keys())
}
pub fn publish_mutation_organ_claims_for_lib(cx: &mut Cx, lib_id: LibId) -> Result<()> {
publish_organ_claims_for_lib(cx, lib_id, mutation_organ_symbol(), mutation_op_keys())
}
fn mutation_op_key(name: &str) -> OpKey {
OpKey::new(Symbol::new("mutation"), Symbol::new(name), 1)
}