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

Method add

atomic-core/src/record/item.rs:169–171  ·  view source on GitHub ↗

Create an Add update for a new file. # Arguments `pos` - The position in the change where the inode span is `inode` - The inode assigned to the new file # Example ```rust use atomic_core::record::InodeUpdate; use atomic_core::types::{ChangePosition, Inode}; let update = InodeUpdate::add(ChangePosition::new(100), Inode::new(5)); assert!(update.is_add()); ```

(pos: ChangePosition, inode: Inode)

Source from the content-addressed store, hash-verified

167 /// assert!(update.is_add());
168 /// ```
169 pub fn add(pos: ChangePosition, inode: Inode) -> Self {
170 Self::Add { pos, inode }
171 }
172
173 /// Create a Deleted update for a removed file.
174 ///

Calls

no outgoing calls