pub struct DiffViewerStyle {Show 14 fields
pub border_style: Style,
pub line_number_style: Style,
pub context_style: Style,
pub addition_style: Style,
pub addition_bg: Color,
pub deletion_style: Style,
pub deletion_bg: Color,
pub inline_addition_style: Style,
pub inline_deletion_style: Style,
pub hunk_header_style: Style,
pub match_style: Style,
pub current_match_style: Style,
pub gutter_separator: &'static str,
pub side_separator: &'static str,
}Expand description
Style configuration for diff viewer
Fields§
§border_style: StyleBorder style
line_number_style: StyleLine number style
context_style: StyleContext line style (unchanged lines)
addition_style: StyleAddition text style
addition_bg: ColorAddition background color
deletion_style: StyleDeletion text style
deletion_bg: ColorDeletion background color
inline_addition_style: StyleInline addition highlight style (for character-level diffs)
inline_deletion_style: StyleInline deletion highlight style (for character-level diffs)
hunk_header_style: StyleHunk header style
match_style: StyleSearch match highlight style
current_match_style: StyleCurrent search match highlight style
gutter_separator: &'static strGutter separator character
side_separator: &'static strSide-by-side mode separator character
Implementations§
Source§impl DiffViewerStyle
impl DiffViewerStyle
Sourcepub fn high_contrast() -> Self
pub fn high_contrast() -> Self
Create a style with high contrast colors
Sourcepub fn monochrome() -> Self
pub fn monochrome() -> Self
Create a monochrome style
Trait Implementations§
Source§impl Clone for DiffViewerStyle
impl Clone for DiffViewerStyle
Source§fn clone(&self) -> DiffViewerStyle
fn clone(&self) -> DiffViewerStyle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DiffViewerStyle
impl Debug for DiffViewerStyle
Auto Trait Implementations§
impl Freeze for DiffViewerStyle
impl RefUnwindSafe for DiffViewerStyle
impl Send for DiffViewerStyle
impl Sync for DiffViewerStyle
impl Unpin for DiffViewerStyle
impl UnwindSafe for DiffViewerStyle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more