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

Method with_hash

atomic-core/src/crdt/branch.rs:165–172  ·  view source on GitHub ↗

Creates a new branch with a pre-computed hash.

(id: BranchId, trunk: TrunkId, line_hash: u64)

Source from the content-addressed store, hash-verified

163
164 /// Creates a new branch with a pre-computed hash.
165 pub fn with_hash(id: BranchId, trunk: TrunkId, line_hash: u64) -> Self {
166 Branch {
167 id,
168 trunk,
169 state: BranchState::Alive,
170 line_hash,
171 }
172 }
173
174 /// Returns the branch's unique identifier.
175 #[inline]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected