pub struct Outcome<'a> {
pub operation: Operation<'a>,
pub old_or_new_is_derived: bool,
pub old: Resource<'a>,
pub new: Resource<'a>,
}Available on crate feature
blob only.Expand description
The outcome of a prepare_diff operation.
Fields§
§operation: Operation<'a>The kind of diff that was actually performed. This may include skipping the internal diff as well.
old_or_new_is_derived: boolIf true, a binary to text filter was used to obtain the buffer
of old or new, making it a derived value.
Applications should check for this to avoid treating the buffer content as (original) resource content.
old: Resource<'a>The old or source of the diff operation.
new: Resource<'a>The new or destination of the diff operation.
Implementations§
Source§impl<'a> Outcome<'a>
impl<'a> Outcome<'a>
Sourcepub fn interned_input(&self) -> InternedInput<&'a [u8]>
pub fn interned_input(&self) -> InternedInput<&'a [u8]>
Produce an instance of an interner which git would use to perform diffs.
Note that newline separators will be removed to improve diff quality at the end of files that didn’t have a newline, but had lines added past the end.
Trait Implementations§
impl<'a> Copy for Outcome<'a>
impl<'a> Eq for Outcome<'a>
impl<'a> StructuralPartialEq for Outcome<'a>
Auto Trait Implementations§
impl<'a> Freeze for Outcome<'a>
impl<'a> RefUnwindSafe for Outcome<'a>
impl<'a> Send for Outcome<'a>
impl<'a> Sync for Outcome<'a>
impl<'a> Unpin for Outcome<'a>
impl<'a> UnwindSafe for Outcome<'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.