documented genome tools

This commit is contained in:
Rendo 2026-03-31 17:42:53 +05:00
commit fc4d9d2ee3
4 changed files with 106 additions and 11 deletions

View file

@ -39,7 +39,7 @@ pub enum GeneType {
},
/// Modifies flow
Modifier {
modify_flow: fn(GeneContext) -> Option<Flow>
modify_flow: fn(GeneContext) -> Flow
},
/// Conditionally passes through flow. Acts like transport.
Trigger {
@ -101,7 +101,7 @@ impl GeneType {
Self::Consumer { consume: consumer_function }
}
/// Creates modifier with modifier function.
pub fn modifier(modifier_function: fn(GeneContext) -> Option<Flow>) -> Self {
pub fn modifier(modifier_function: fn(GeneContext) -> Flow) -> Self {
Self::Modifier { modify_flow: modifier_function }
}
/// Creates trigger with distribution between all children.