[−][src]Struct unsegen_pager::HighlightInfo
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]
&self,
l: L
) -> &Vec<(usize, StyleModifier)>
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
impl Unpin for HighlightInfo
impl Sync for HighlightInfo
impl Send for HighlightInfo
impl RefUnwindSafe for HighlightInfo
impl UnwindSafe for HighlightInfo
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,