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

Method new

atomic-core/src/crdt/trunk.rs:175–183  ·  view source on GitHub ↗

Creates a new trunk with the given properties. The trunk starts in the [`TrunkState::Alive`] state.

(id: TrunkId, inode: Inode, path: String, encoding: Option<Encoding>)

Source from the content-addressed store, hash-verified

173 ///
174 /// The trunk starts in the [`TrunkState::Alive`] state.
175 pub fn new(id: TrunkId, inode: Inode, path: String, encoding: Option<Encoding>) -> Self {
176 Trunk {
177 id,
178 inode,
179 path,
180 encoding,
181 state: TrunkState::Alive,
182 }
183 }
184
185 /// Returns the trunk's unique identifier.
186 #[inline]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected