[][src]Struct unsegen_pager::HighlightInfo

pub struct HighlightInfo {
    pub style_changes: Vec<Vec<(usize, StyleModifier)>>,
    pub default_style: StyleModifier,
    // some fields omitted
}

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.

Methods

impl HighlightInfo[src]

pub fn none() -> Self[src]

Empty highlighting result that will not apply any style changes.

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]

Return the default style, i.e., the style that will be applied to text if no modifications are present.

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]