pub struct PathEntry {
pub workspace_id: WorkspaceId,
pub kind: ChangeKind,
pub content: Option<Vec<u8>>,
pub file_id: Option<FileId>,
pub blob: Option<GitOid>,
}Expand description
A single workspace’s change to a particular file path.
Stored as entries in the inverted index. For non-deletions, content
holds the new file content. For deletions, content is None.
file_id carries the stable FileId from the collect step (§5.8).
When populated, the resolve step can group renames correctly — two entries
with the same FileId but different paths represent a rename + content
change rather than an independent add/delete pair.
blob is the git blob OID for the new content. The resolve step prefers
OID equality (blob == blob) over byte-level content comparison.
Fields§
§workspace_id: WorkspaceIdThe workspace that made this change.
kind: ChangeKindWhat kind of change was made.
content: Option<Vec<u8>>New file content (None for deletions).
file_id: Option<FileId>Stable file identity (§5.8). None for legacy/test paths without tracking.
blob: Option<GitOid>Git blob OID for the new content (Add/Modify only; None for Delete
and paths collected without git access).
Implementations§
Source§impl PathEntry
impl PathEntry
Sourcepub const fn new(
workspace_id: WorkspaceId,
kind: ChangeKind,
content: Option<Vec<u8>>,
) -> Self
pub const fn new( workspace_id: WorkspaceId, kind: ChangeKind, content: Option<Vec<u8>>, ) -> Self
Create a PathEntry without identity metadata (Phase 1 compat).
Sourcepub const fn with_identity(
workspace_id: WorkspaceId,
kind: ChangeKind,
content: Option<Vec<u8>>,
file_id: Option<FileId>,
blob: Option<GitOid>,
) -> Self
pub const fn with_identity( workspace_id: WorkspaceId, kind: ChangeKind, content: Option<Vec<u8>>, file_id: Option<FileId>, blob: Option<GitOid>, ) -> Self
Create a PathEntry with full identity metadata (Phase 3+).
Sourcepub const fn is_deletion(&self) -> bool
pub const fn is_deletion(&self) -> bool
Returns true if this entry is a deletion.
Trait Implementations§
impl Eq for PathEntry
impl StructuralPartialEq for PathEntry
Auto Trait Implementations§
impl Freeze for PathEntry
impl RefUnwindSafe for PathEntry
impl Send for PathEntry
impl Sync for PathEntry
impl Unpin for PathEntry
impl UnsafeUnpin for PathEntry
impl UnwindSafe for PathEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.