INNER CODE UNIT · Rust

handle

thalo-rs/thalo · crates/thalo/src/lib.rs:140

    fn handle(&self, cmd: C) -> Result<Vec<Self::Event>, Self::Error>;
}

/// Applies an event, updating the aggregate state.
///
/// Events modify aggregate state, and are emitted as the result of commands.
///
/// # Example
///
/// ```
/// use thalo::Apply;
///
/// pub struct Increment {
///     pub amount: u64,
/// }
///
/// impl Apply<Incremented> for Counter {
///     fn apply(&mut self, event: Incremented) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…