Skip to main content

EffectiveChange

Enum EffectiveChange 

Source
pub enum EffectiveChange {
    Inserted {
        path: PathBuf,
        kind: EntryKind,
        attrs: Attrs,
    },
    Updated {
        path: PathBuf,
        kind: EntryKind,
        previous: Attrs,
        current: Attrs,
    },
    Removed {
        path: PathBuf,
        kind: EntryKind,
        attrs: Attrs,
    },
    ControlUpdated {
        path: PathBuf,
        previous: Option<ControlIdentity>,
        current: Option<ControlIdentity>,
    },
    ControlRefusalUpdated {
        path: PathBuf,
        previous: Option<ControlRefusalReason>,
        current: Option<ControlRefusalReason>,
    },
    Reclassified {
        path: PathBuf,
        previous_ignored: bool,
        current_ignored: bool,
    },
    Invalidated {
        path: PathBuf,
        reason: InvalidateReason,
    },
}
Expand description

One exact fact mutation performed by the index.

These are deliberately more specific than Op. An observation says what a producer requested; an effective change says what the index actually did. One upsert may, for example, replace a subtree and insert a differently typed entry.

Variants§

§

Inserted

A previously absent entry was inserted.

Fields

§path: PathBuf

Relative path of the inserted entry.

§kind: EntryKind

Filesystem kind retained for the entry.

§attrs: Attrs

Metadata retained for the entry.

§

Updated

An existing entry retained its kind and changed metadata.

Fields

§path: PathBuf

Relative path of the updated entry.

§kind: EntryKind

Filesystem kind retained for the entry.

§previous: Attrs

Metadata before the commit.

§current: Attrs

Metadata after the commit.

§

Removed

One entry was removed. Removing a subtree records one change per entry.

Fields

§path: PathBuf

Relative path of the removed entry.

§kind: EntryKind

Filesystem kind the entry had before removal.

§attrs: Attrs

Metadata the entry had before removal.

§

ControlUpdated

Exact control source identity changed.

Fields

§path: PathBuf

Relative .gitignore path.

§previous: Option<ControlIdentity>

Previous source identity, or absence.

§current: Option<ControlIdentity>

Current source identity, or absence.

§

ControlRefusalUpdated

A control file was refused, or its refusal lifted, so ignore classification’s coverage changed.

A refusal replacing a retained source arrives with the Self::ControlUpdated that drops the source; a refusal of a file no rule came from arrives alone.

Fields

§path: PathBuf

Relative .gitignore path.

§previous: Option<ControlRefusalReason>

Why the file was refused before the commit, or absence.

§current: Option<ControlRefusalReason>

Why the file is refused after the commit, or absence.

§

Reclassified

One retained entry moved between the fixed ignored and unignored partitions.

Fields

§path: PathBuf

Relative retained-entry path.

§previous_ignored: bool

Effective ignore classification before the commit.

§current_ignored: bool

Effective ignore classification after the commit.

§

Invalidated

A producer reported uncertainty that requires verified reconciliation.

Fields

§path: PathBuf

Relative root of the invalidated subtree.

§reason: InvalidateReason

Why precise facts were unavailable.

Implementations§

Source§

impl EffectiveChange

Source

pub fn path(&self) -> &Path

Relative path affected by this change.

Trait Implementations§

Source§

impl Clone for EffectiveChange

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for EffectiveChange

Source§

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

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

impl Eq for EffectiveChange

Source§

impl PartialEq for EffectiveChange

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for EffectiveChange

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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.