distributed 4.3.0

CQRS/ES framework for Rust using Plain Old Rust Structs — append-only events, replay, snapshots, outbox, service bus, and pluggable infrastructure
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use distributed::ReadModel;
use serde::{Deserialize, Serialize};

use super::CardView;

/// Board header row. `has_many` cards and a `source_version` guard for
/// out-of-order delivery.
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize, ReadModel)]
#[table("boards")]
pub struct BoardView {
    #[id("board_id")]
    pub board_id: String,
    pub name: String,
    pub source_version: i64,
    #[readmodel(has_many = "CardView", foreign_key = "board_id")]
    pub cards: Vec<CardView>,
}