#[non_exhaustive]pub enum DiffLabel<'a> {
DevNull,
Path {
prefix: &'a str,
path: &'a str,
},
Verbatim(&'a str),
}Expand description
One side’s --- / +++ header label in UnifiedDiffOptions.
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.
DevNull
/dev/null: this side does not exist (an added or deleted file).
Path
prefix followed by path (for example a/ and src/lib.rs).
The whole label is C-quoted when the path needs it (see PathQuoting), and a tab is
appended when the path contains a space, exactly as Git writes it.
Fields
Verbatim(&'a str)
Written as given, with no quoting.
Trait Implementations§
impl<'a> Copy for DiffLabel<'a>
impl<'a> Eq for DiffLabel<'a>
impl<'a> StructuralPartialEq for DiffLabel<'a>
Auto Trait Implementations§
impl<'a> Forget for DiffLabel<'a>
impl<'a> Freeze for DiffLabel<'a>
impl<'a> RefUnwindSafe for DiffLabel<'a>
impl<'a> Send for DiffLabel<'a>
impl<'a> Sync for DiffLabel<'a>
impl<'a> Unpin for DiffLabel<'a>
impl<'a> UnsafeUnpin for DiffLabel<'a>
impl<'a> UnwindSafe for DiffLabel<'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§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.