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

Method new

atomic-cli/src/commands/pull/types.rs:119–127  ·  view source on GitHub ↗

Create a new pull change with minimal information. Creates a `PullChange` with the required fields and sensible defaults for optional fields (`tagged = false`, `message = None`). # Arguments `hash` - The change's content hash `sequence` - The sequence number in the remote view `state` - The Merkle state after this change # Returns A new `PullChange` instance. # Example ```rust use atomic::c

(hash: Hash, sequence: u64, state: Merkle)

Source from the content-addressed store, hash-verified

117 /// assert!(change.message.is_none());
118 /// ```
119 pub fn new(hash: Hash, sequence: u64, state: Merkle) -> Self {
120 Self {
121 hash,
122 sequence,
123 state,
124 tagged: false,
125 message: None,
126 }
127 }
128
129 /// Set the tagged flag.
130 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected