pub struct Palette {Show 14 fields
pub removed: Style,
pub added: Style,
pub removed_emphasis: Style,
pub added_emphasis: Style,
pub moved_away: Style,
pub moved_here: Style,
pub removed_sign: Color,
pub added_sign: Color,
pub moved_sign: Color,
pub keyword: Color,
pub string: Color,
pub comment: Color,
pub number: Color,
pub search: Style,
}Expand description
The viewer’s colours, tuned for a dark terminal: a quiet tint behind changed lines, a stronger one behind the words that changed, and only four syntax colours — none of them loud — so the diff, not the syntax, is what stands out.
Fields§
§removed: Style§added: Style§removed_emphasis: Style§added_emphasis: Style§moved_away: Style§moved_here: Style§removed_sign: Color§added_sign: Color§moved_sign: Color§keyword: Color§string: Color§comment: Color§number: Color§search: StyleImplementations§
Source§impl Palette
impl Palette
Sourcepub const TRUE_COLOR: Palette
pub const TRUE_COLOR: Palette
For terminals with 24-bit colour, which allows tints dark enough to sit quietly behind syntax colours.
Sourcepub const COLOR_256: Palette
pub const COLOR_256: Palette
For 256-colour terminals. Their darkest reds and greens are too strong to fill a whole line, so changed lines get no tint — removed ones are dimmed instead — and only the changed words get a background.
Trait Implementations§
impl Copy for Palette
impl Eq for Palette
impl StructuralPartialEq for Palette
Auto Trait Implementations§
impl Freeze for Palette
impl RefUnwindSafe for Palette
impl Send for Palette
impl Sync for Palette
impl Unpin for Palette
impl UnsafeUnpin for Palette
impl UnwindSafe for Palette
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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