pub enum Diff<'a> {
Text(TextDiff<'a>),
Style(StyleDiff<'a>),
}Expand description
Generic difference between two StyledStrs: either a difference in text, or in styling.
Produced by the StyledStr::diff() method.
Variants§
Text(TextDiff<'a>)
There is a difference in text between the compared strings.
Style(StyleDiff<'a>)
String texts match, but there is a difference in ANSI styles.
Trait Implementations§
Source§impl Error for Diff<'_>
impl Error for Diff<'_>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl<'a> Freeze for Diff<'a>
impl<'a> RefUnwindSafe for Diff<'a>
impl<'a> Send for Diff<'a>
impl<'a> Sync for Diff<'a>
impl<'a> Unpin for Diff<'a>
impl<'a> UnwindSafe for Diff<'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