Struct termdiff::Theme [−][src]
pub struct Theme {
pub highlight_insert: fn(_: String) -> StyledContent<String>,
pub highlight_delete: fn(_: String) -> StyledContent<String>,
pub equal_content: fn(_: String) -> StyledContent<String>,
pub equal_prefix: String,
pub delete_content: fn(_: String) -> StyledContent<String>,
pub delete_prefix: String,
pub insert_line: fn(_: String) -> StyledContent<String>,
pub insert_prefix: String,
pub line_end: String,
pub header: String,
}Expand description
A Theme for the diff
This is to allows some control over what the diff looks like without having to parse it yourself
Fields
highlight_insert: fn(_: String) -> StyledContent<String>How to format the text when highlighting it for inserts
highlight_delete: fn(_: String) -> StyledContent<String>How to format the text when highlighting it for deletes
equal_content: fn(_: String) -> StyledContent<String>How to format unchanged content
equal_prefix: StringThe prefix to give lines that are equal
delete_content: fn(_: String) -> StyledContent<String>How to format bits of text that are being removed
delete_prefix: StringThe prefix to give lines that are being removed
insert_line: fn(_: String) -> StyledContent<String>How to format bits of text that are being added
insert_prefix: StringThe prefix to give lines that are being added
line_end: StringIf a diff line doesn’t end with a newline, what should we insert
header: StringA header to put above the diff