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

Method new

atomic-cli/src/commands/push/types.rs:80–89  ·  view source on GitHub ↗

Create a new push change with minimal information. # Arguments `hash` - The change's content hash `sequence` - The sequence number in the view `state` - The Merkle state after this change # Example ```rust use atomic::commands::push::types::PushChange; use atomic_core::types::{Hash, Merkle}; let hash = Hash::of(b"change content"); let change = PushChange::new(hash, 0, Merkle::ZERO); assert_eq

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

Source from the content-addressed store, hash-verified

78 /// assert!(change.message.is_none());
79 /// ```
80 pub fn new(hash: Hash, sequence: u64, state: Merkle) -> Self {
81 Self {
82 hash,
83 sequence,
84 state,
85 tagged: false,
86 message: None,
87 in_graph: false,
88 }
89 }
90
91 /// Set the tagged flag.
92 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected