Struct unsegen_pager::HighlightInfo [−][src]
pub struct HighlightInfo { pub style_changes: Vec<Vec<(usize, StyleModifier)>>, pub default_style: StyleModifier, }
Expand description
Result of a highlighting operation (i.e., a call to Highlighter::highlight).
Fields
style_changes: Vec<Vec<(usize, StyleModifier)>>
A map of changes per line. The outer Vec
corresponds to lines. The entries of the inner
Vec
specify that at the specified column index, the given modifier should be applied.
default_style: StyleModifier
Style that will be applied if no other style has been specified.
Implementations
impl HighlightInfo
[src]
impl HighlightInfo
[src]pub fn get_info_for_line<L: Into<LineIndex>>(
&self,
l: L
) -> &Vec<(usize, StyleModifier)>
[src]
pub fn get_info_for_line<L: Into<LineIndex>>(
&self,
l: L
) -> &Vec<(usize, StyleModifier)>
[src]Get any style changes for the specified line.
pub fn default_style(&self) -> StyleModifier
[src]
pub fn default_style(&self) -> StyleModifier
[src]Return the default style, i.e., the style that will be applied to text if no modifications are present.