Skip to main content

kmp_domain/value_objects/
node_card_stamp.rs

1/// What a stored card declares about itself, without its prose.
2///
3/// A read that may not show the text still owes the reader the provenance:
4/// which body version the card was authored from, which card revision it is,
5/// who wrote it and when. Separating the stamp from the text is what makes a
6/// stale or post-cut card structurally unable to leak its prose — there is no
7/// text field on this type to forget to clear.
8#[derive(Debug, Clone, PartialEq, Eq)]
9pub struct NodeCardStamp {
10    pub source_revision: u64,
11    pub source_content_hash: String,
12    pub source_record_digest: String,
13    pub source_body_bytes: u64,
14    pub card_revision: u64,
15    pub authored_by: String,
16    pub authored_at: String,
17    /// Byte length of the stored card text. Reported so a reader can see what
18    /// a regeneration would buy without being shown the text itself.
19    pub text_bytes: u64,
20}