pub enum DiffSelector {
NonInteractive,
Interactive(DiffEditor),
}Expand description
Wrapper around a DiffEditor to conditionally start interactive session.
Variants§
NonInteractive
Interactive(DiffEditor)
Implementations§
Source§impl DiffSelector
impl DiffSelector
pub fn is_interactive(&self) -> bool
Sourcepub fn select(
&self,
[left_tree, right_tree]: [&MergedTree; 2],
matcher: &dyn Matcher,
format_instructions: impl FnOnce() -> String,
) -> Result<MergedTreeId, CommandError>
pub fn select( &self, [left_tree, right_tree]: [&MergedTree; 2], matcher: &dyn Matcher, format_instructions: impl FnOnce() -> String, ) -> Result<MergedTreeId, CommandError>
Restores diffs from the right_tree to the left_tree by using an
interactive editor if enabled.
Only files matching the matcher will be copied to the new tree.
Trait Implementations§
Source§impl Clone for DiffSelector
impl Clone for DiffSelector
Source§fn clone(&self) -> DiffSelector
fn clone(&self) -> DiffSelector
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DiffSelector
impl RefUnwindSafe for DiffSelector
impl Send for DiffSelector
impl Sync for DiffSelector
impl Unpin for DiffSelector
impl UnwindSafe for DiffSelector
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<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