pub enum Operation<'a> {
InternalDiff {
algorithm: Algorithm,
},
ExternalCommand {
command: &'a BStr,
},
SourceOrDestinationIsBinary,
}
blob
only.Expand description
The kind of operation that should be performed based on the configuration of the resources involved in the diff.
Variants§
InternalDiff
The internal diff algorithm should be called with the provided arguments.
This only happens if none of the resources are binary, and if there is no external diff program configured via git-attributes
or Options::skip_internal_diff_if_external_is_configured
is false
.
Use Outcome::interned_input()
to easily obtain an interner for use with imara_diff::diff()
, or maintain one yourself
for greater reuse.
Fields
ExternalCommand
Run the external diff program according as configured in the source
-resources driver.
This only happens if Options::skip_internal_diff_if_external_is_configured
was true
, preventing the usage of the internal diff implementation.
Fields
command: &'a BStr
The command as extracted from Driver::command.
Use it in Platform::prepare_diff_command
to easily prepare a compatible invocation.
SourceOrDestinationIsBinary
Trait Implementations§
impl<'a> Copy for Operation<'a>
impl<'a> Eq for Operation<'a>
impl<'a> StructuralPartialEq for Operation<'a>
Auto Trait Implementations§
impl<'a> Freeze for Operation<'a>
impl<'a> RefUnwindSafe for Operation<'a>
impl<'a> Send for Operation<'a>
impl<'a> Sync for Operation<'a>
impl<'a> Unpin for Operation<'a>
impl<'a> UnwindSafe for Operation<'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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)