#[non_exhaustive]pub enum DiffSpec {
WorkingTree,
Rev(String),
}Expand description
What a GitApi::diff / GitApi::diff_text call compares.
#[non_exhaustive] so more comparison shapes can be added later.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
WorkingTree
All tracked working-tree changes vs the last commit (git diff HEAD),
staged or not, excluding untracked files.
Rev(String)
A specific revision or range, e.g. main..HEAD or HEAD~1 (git diff <rev>).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DiffSpec
impl RefUnwindSafe for DiffSpec
impl Send for DiffSpec
impl Sync for DiffSpec
impl Unpin for DiffSpec
impl UnsafeUnpin for DiffSpec
impl UnwindSafe for DiffSpec
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