MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / Change

Class Change

atomic-core/src/change/change.rs:118–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116/// per-section zstd compression, and incremental blake3 hashing.
117#[derive(Clone, Debug)]
118pub struct Change {
119 /// The hashed portion (contributes to change hash)
120 pub hashed: HashedChange,
121
122 /// Optional unhashed metadata (JSON)
123 ///
124 /// This can contain arbitrary data that doesn't affect the change hash.
125 /// Useful for storing editor metadata, review comments, AI transcripts, etc.
126 pub unhashed: Option<serde_json::Value>,
127
128 /// Optional Ed25519 signature over the change's content hash.
129 ///
130 /// Excluded from the change hash (the SIGNATURE section is unhashed), so
131 /// re-signing with a different key never changes the change's identity.
132 /// `None` for unsigned (legacy) changes.
133 pub signature: Option<format_v3::ChangeSignature>,
134
135 /// Binary content blob
136 ///
137 /// This contains the actual file content referenced by hunks.
138 /// Hunks reference byte ranges within this blob.
139 pub contents: Vec<u8>,
140}
141
142impl Change {
143 /// Create a new change.

Callers 1

Calls

no outgoing calls

Tested by 1