pub struct RenderColors<'a> {Show 15 fields
pub frag: &'a str,
pub func: &'a str,
pub old: &'a str,
pub new: &'a str,
pub context: &'a str,
pub reset: &'a str,
pub whitespace: &'a str,
pub old_moved: &'a str,
pub old_moved_alt: &'a str,
pub old_moved_dim: &'a str,
pub old_moved_alt_dim: &'a str,
pub new_moved: &'a str,
pub new_moved_alt: &'a str,
pub new_moved_dim: &'a str,
pub new_moved_alt_dim: &'a str,
}Expand description
ANSI color palette for a unified diff, mirroring git’s diff_get_color
slots. Each field is the raw escape sequence (empty string = no color).
The renderer only consults the slots it paints in the hunk body; the
per-file metainfo slot (meta) lives with the caller’s header emitter and
is intentionally absent here.
Fields§
§frag: &'a strcolor.diff.frag — the @@ .. @@ span.
func: &'a strcolor.diff.func — the section heading after the frag.
old: &'a strcolor.diff.old — removed (-) lines.
new: &'a strcolor.diff.new — added (+) lines.
context: &'a strcolor.diff.context — context ( ) lines and the no-newline marker.
reset: &'a strThe reset sequence terminating each colored span.
whitespace: &'a strcolor.diff.whitespace — the highlight for whitespace errors
(--ws-error-highlight).
old_moved: &'a strcolor.diff.oldMoved — removed lines detected as moved.
old_moved_alt: &'a strcolor.diff.oldMovedAlternative — alternate removed moved block.
old_moved_dim: &'a strcolor.diff.oldMovedDimmed — uninteresting removed moved line.
old_moved_alt_dim: &'a strcolor.diff.oldMovedAlternativeDimmed — alternate dimmed removed line.
new_moved: &'a strcolor.diff.newMoved — added lines detected as moved.
new_moved_alt: &'a strcolor.diff.newMovedAlternative — alternate added moved block.
new_moved_dim: &'a strcolor.diff.newMovedDimmed — uninteresting added moved line.
new_moved_alt_dim: &'a strcolor.diff.newMovedAlternativeDimmed — alternate dimmed added line.
Trait Implementations§
Source§impl<'a> Clone for RenderColors<'a>
impl<'a> Clone for RenderColors<'a>
Source§fn clone(&self) -> RenderColors<'a>
fn clone(&self) -> RenderColors<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more