[go: up one dir, main page]

Struct Outcome

Source
pub struct Outcome {
    pub index_worktree: Outcome,
    pub tree_index: Option<Outcome>,
    pub worktree_index: IndexPersistedOrInMemory,
    /* private fields */
}
Available on crate feature status only.
Expand description

The data the thread sends over to the receiving iterator.

Fields§

§index_worktree: Outcome

The outcome of the index-to-worktree comparison operation.

§tree_index: Option<Outcome>

The outcome of the diff between HEAD^{tree} and the index, or None if this outcome was produced with the into_index_worktree_iter().

§worktree_index: IndexPersistedOrInMemory

The worktree index that was used for the operation.

Implementations§

Source§

impl Outcome

Source

pub fn has_changes(&self) -> bool

Returns true if the index has received currently unapplied changes that should be written back.

If they are not written back, subsequent status operations will take longer to complete, whereas the additional work can be prevented by writing the changes back to the index.

Source

pub fn write_changes(&mut self) -> Option<Result<(), Error>>

Write the changes if there are any back to the index file. This can only be done once as the changes are consumed in the process, if there were any.

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

Source§

type Output = T

Should always be Self
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<T> ErasedDestructor for T
where T: 'static,