pub struct GutterMarks {
pub severity: Option<Severity>,
pub breakpoint: bool,
}Expand description
Everything the gutter has to say about ONE line.
§Why this is a struct and not a second Option<Severity> parameter
The gutter had exactly one mark cell and gutter_cells took exactly one
Option<Severity>. A breakpoint is not a severity — it is a thing the
OPERATOR put there, not a thing a producer found — so squeezing it into
that cell would mean a line carrying both an error and a breakpoint could
only show one of them, and whichever lost would be invisible with no
indication that anything had been hidden.
So each plane gets its own cell, and they arrive together in one value.
There is deliberately no From<Option<Severity>> and no Default:
every construction names both planes, which is what makes adding a third
(git hunks are next) a compile error at every call site rather than a
silently-omitted column.
Fields§
§severity: Option<Severity>The WORST finding severity on the line, or None.
breakpoint: boolWhether a debug breakpoint sits on the line.
Implementations§
Trait Implementations§
Source§impl Clone for GutterMarks
impl Clone for GutterMarks
Source§fn clone(&self) -> GutterMarks
fn clone(&self) -> GutterMarks
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more