kmp-domain 0.1.5

Domain model of the Kernel Memory Protocol: aggregates, value objects, repositories and projections, with no IO
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct BundleMetadata {
    pub revision: u64,
    pub content_hash: String,
    pub generator_version: String,
}

impl BundleMetadata {
    pub fn initial(generator_version: impl Into<String>) -> Self {
        Self {
            revision: 1,
            content_hash: "pending".to_string(),
            generator_version: generator_version.into(),
        }
    }
}