Struct termdiff::SignsTheme [−][src]
pub struct SignsTheme {}Expand description
A simple colorless using signs theme
Examples
use termdiff::{diff, SignsTheme};
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();
let theme = SignsTheme::default();
diff(&mut buffer, old, new, &theme).unwrap();
let actual: String = String::from_utf8(buffer).expect("Not valid UTF-8");
assert_eq!(
actual,
"--- remove | insert +++
-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 SignsTheme
impl Send for SignsTheme
impl Sync for SignsTheme
impl Unpin for SignsTheme
impl UnwindSafe for SignsTheme
Blanket Implementations
Mutably borrows from an owned value. Read more