#[non_exhaustive]pub enum CopyDetection {
Off,
Similarity(u8),
FindHarder(u8),
}Expand description
Copy detection policy for tree, index and work-tree diffs (Git -C).
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.
Off
Do not detect copies.
Similarity(u8)
Pair added paths with paths changed in the same diff when content is at least this
percent similar (Git -C<n>).
FindHarder(u8)
Like Self::Similarity, but every path of the old side is a copy source, changed or
not (Git -C<n> --find-copies-harder).
Implementations§
Source§impl CopyDetection
impl CopyDetection
Sourcepub fn threshold_percent(self) -> Option<u32>
pub fn threshold_percent(self) -> Option<u32>
Copy similarity threshold in percent, or None when Self::Off.
Trait Implementations§
Source§impl Clone for CopyDetection
impl Clone for CopyDetection
impl Copy for CopyDetection
Source§impl Debug for CopyDetection
impl Debug for CopyDetection
Source§impl Default for CopyDetection
impl Default for CopyDetection
impl Eq for CopyDetection
Source§impl PartialEq for CopyDetection
impl PartialEq for CopyDetection
impl StructuralPartialEq for CopyDetection
Auto Trait Implementations§
impl Forget for CopyDetection
impl Freeze for CopyDetection
impl RefUnwindSafe for CopyDetection
impl Send for CopyDetection
impl Sync for CopyDetection
impl Unpin for CopyDetection
impl UnsafeUnpin for CopyDetection
impl UnwindSafe for CopyDetection
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§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.