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: String

The 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: String

The 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: String

The prefix to give lines that are being added

line_end: String

If a diff line doesn’t end with a newline, what should we insert

header: String

A header to put above the diff

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.