Get the position for an Add update. # Returns `Some(pos)` if this is an Add, `None` if Deleted. # Example ```rust use atomic_core::record::InodeUpdate; use atomic_core::types::{ChangePosition, Inode}; let add = InodeUpdate::add(ChangePosition::new(100), Inode::new(1)); assert_eq!(add.position(), Some(ChangePosition::new(100))); let del = InodeUpdate::deleted(Inode::new(1)); assert_eq!(del.po
(&self)
| 251 | /// assert_eq!(del.position(), None); |
| 252 | /// ``` |
| 253 | pub fn position(&self) -> Option<ChangePosition> { |
| 254 | match self { |
| 255 | Self::Add { pos, .. } => Some(*pos), |
| 256 | Self::Deleted { .. } => None, |
| 257 | } |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | /// Metadata about a file in the working copy. |
nothing calls this directly
no outgoing calls
no test coverage detected