Skip to main content

PathEntry

Struct PathEntry 

Source
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: WorkspaceId

The workspace that made this change.

§kind: ChangeKind

What 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

Source

pub const fn new( workspace_id: WorkspaceId, kind: ChangeKind, content: Option<Vec<u8>>, ) -> Self

Create a PathEntry without identity metadata (Phase 1 compat).

Source

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+).

Source

pub const fn is_deletion(&self) -> bool

Returns true if this entry is a deletion.

Trait Implementations§

Source§

impl Clone for PathEntry

Source§

fn clone(&self) -> PathEntry

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PathEntry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for PathEntry

Source§

fn eq(&self, other: &PathEntry) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for PathEntry

Source§

impl StructuralPartialEq for PathEntry

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more