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

Method inode

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

Get the inode associated with this update. # Returns The inode for both Add and Deleted variants. # Example ```rust use atomic_core::record::InodeUpdate; use atomic_core::types::{ChangePosition, Inode}; let add = InodeUpdate::add(ChangePosition::new(0), Inode::new(42)); assert_eq!(add.inode(), Inode::new(42)); let del = InodeUpdate::deleted(Inode::new(42)); assert_eq!(del.inode(), Inode::new

(&self)

Source from the content-addressed store, hash-verified

226 /// assert_eq!(del.inode(), Inode::new(42));
227 /// ```
228 pub fn inode(&self) -> Inode {
229 match self {
230 Self::Add { inode, .. } => *inode,
231 Self::Deleted { inode } => *inode,
232 }
233 }
234
235 /// Get the position for an Add update.
236 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected