pub struct ChangedPath {
pub path: Vec<u8>,
pub after: Vec<StageRecord>,
}Expand description
What:
One path a staging operation changed,
with what the index holds there afterwards.
Vec<StageRecord> is empty when the operation removed the path from the index.
Why:
A candidate is built from the state after the operation;
a removed path becomes
a deletion only when the baseline commit has it.
In TS you’d write (pseudocode):
type ChangedPath = { path: Buffer; after: StageRecord[] };Fields§
§path: Vec<u8>Repository-relative pathname.
after: Vec<StageRecord>The path’s records after the operation, in stage order; empty when it was removed.
Trait Implementations§
Source§impl Clone for ChangedPath
impl Clone for ChangedPath
Source§impl Debug for ChangedPath
impl Debug for ChangedPath
impl Eq for ChangedPath
Source§impl PartialEq for ChangedPath
impl PartialEq for ChangedPath
impl StructuralPartialEq for ChangedPath
Auto Trait Implementations§
impl Freeze for ChangedPath
impl RefUnwindSafe for ChangedPath
impl Send for ChangedPath
impl Sync for ChangedPath
impl Unpin for ChangedPath
impl UnsafeUnpin for ChangedPath
impl UnwindSafe for ChangedPath
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
Mutably borrows from an owned value. Read more
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more