0.6 rust重构01

This commit is contained in:
lix-2026
2026-04-14 13:22:29 +08:00
parent 71fb1aee7e
commit 84a8454fa9
401 changed files with 5841 additions and 1512 deletions
+10
View File
@@ -0,0 +1,10 @@
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct EventGenerationRule {
pub command_succeeded: bool,
pub changed_domain_state: bool,
pub rolled_back: bool,
}
pub fn should_emit_domain_event(rule: &EventGenerationRule) -> bool {
rule.command_succeeded && rule.changed_domain_state && !rule.rolled_back
}