factstr 0.3.2

Rust event store contract for append-only facts, streams, and command context consistency.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use serde_json::Value;

#[derive(Clone, Debug, Eq, PartialEq)]
pub struct NewEvent {
    pub event_type: String,
    pub payload: Value,
}

impl NewEvent {
    pub fn new(event_type: impl Into<String>, payload: Value) -> Self {
        Self {
            event_type: event_type.into(),
            payload,
        }
    }
}