pub enum NewlineSeparator<'a> {
AfterHeaderAndLine(&'a str),
AfterHeaderAndWhenNeeded(&'a str),
}
Available on crate feature
blob
only.Expand description
Specify where to put a newline.
Variants§
AfterHeaderAndLine(&'a str)
Place the given newline separator, like \n
, after each patch header as well as after each line.
This is the right choice if tokens don’t include newlines.
AfterHeaderAndWhenNeeded(&'a str)
Place the given newline separator, like \n
, only after each patch header or if a line doesn’t contain a newline.
This is the right choice if tokens do include newlines.
Note that diff-tokens with newlines may diff strangely at the end of files when lines have been appended,
as it will make the last line look like it changed just because the whitespace at the end ‘changed’.
Trait Implementations§
Source§impl<'a> Clone for NewlineSeparator<'a>
impl<'a> Clone for NewlineSeparator<'a>
Source§fn clone(&self) -> NewlineSeparator<'a>
fn clone(&self) -> NewlineSeparator<'a>
Returns a copy 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 moreSource§impl<'a> Debug for NewlineSeparator<'a>
impl<'a> Debug for NewlineSeparator<'a>
impl<'a> Copy for NewlineSeparator<'a>
Auto Trait Implementations§
impl<'a> Freeze for NewlineSeparator<'a>
impl<'a> RefUnwindSafe for NewlineSeparator<'a>
impl<'a> Send for NewlineSeparator<'a>
impl<'a> Sync for NewlineSeparator<'a>
impl<'a> Unpin for NewlineSeparator<'a>
impl<'a> UnwindSafe for NewlineSeparator<'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