pub enum Staged<'a> {
Remove,
Recorded {
mode: &'a str,
oid: &'a str,
},
Apply {
mode: &'a str,
},
}Expand description
How one file should be staged.
Variants§
Remove
Drop the path from the tree.
Recorded
Stage an oid recorded in the diff, verbatim.
The documented tautology, and the only place one is allowed: gitlinks and binary files carry no hunks, so a recorded oid is the sole available content. The invariant report says so out loud.
Apply
Stage content computed by applying hunks.
Never by copying the head blob: with the copy shortcut the tree assertion holds by construction and proves nothing (invariant 3).
Trait Implementations§
impl<'a> Copy for Staged<'a>
impl<'a> Eq for Staged<'a>
impl<'a> StructuralPartialEq for Staged<'a>
Auto Trait Implementations§
impl<'a> Freeze for Staged<'a>
impl<'a> RefUnwindSafe for Staged<'a>
impl<'a> Send for Staged<'a>
impl<'a> Sync for Staged<'a>
impl<'a> Unpin for Staged<'a>
impl<'a> UnsafeUnpin for Staged<'a>
impl<'a> UnwindSafe for Staged<'a>
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§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.