Struct termdiff::ArrowsTheme [−][src]
pub struct ArrowsTheme {}Expand description
A simple colorless using arrows theme
Examples
use termdiff::{diff, ArrowsTheme};
let old = "The quick brown fox and\njumps over the sleepy dog";
let new = "The quick red fox and\njumps over the lazy dog";
let mut buffer: Vec<u8> = Vec::new();
diff(&mut buffer, old, new, &ArrowsTheme::default()).unwrap();
let actual: String = String::from_utf8(buffer).expect("Not valid UTF-8");
assert_eq!(
actual,
"< left / > right
<The quick brown fox and
<jumps over the sleepy dog
>The quick red fox and
>jumps over the lazy dog
"
);Trait Implementations
Returns the “default value” for a type. Read more
The prefix to give lines that are equal
The prefix to give lines that are being removed
The prefix to give lines that are being added
How to format the text when highlighting it for inserts
How to format the text when highlighting it for deletes
How to format unchanged content
How to format bits of text that are being removed
How to format bits of text that are being added
Auto Trait Implementations
impl RefUnwindSafe for ArrowsTheme
impl Send for ArrowsTheme
impl Sync for ArrowsTheme
impl Unpin for ArrowsTheme
impl UnwindSafe for ArrowsTheme
Blanket Implementations
Mutably borrows from an owned value. Read more