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
+23
View File
@@ -0,0 +1,23 @@
pub mod command_log;
pub mod domain_event;
pub mod rules;
pub use command_log::{CommandLogRecord, CommandLogStatus};
pub use domain_event::{DomainEventRecord, EventGenerationOutcome, EventStatus};
pub use rules::{should_emit_domain_event, EventGenerationRule};
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn failed_command_does_not_emit_success_event() {
let should_emit = should_emit_domain_event(&EventGenerationRule {
command_succeeded: false,
changed_domain_state: false,
rolled_back: false,
});
assert!(!should_emit);
}
}