pub struct DiagOverlay {
pub row: usize,
pub col_start: usize,
pub col_end: usize,
pub style: Style,
}Expand description
A char-column range on a document row that should be styled with an overlay (e.g. an underline for LSP diagnostics). Applied in a post-paint pass so it composes on top of syntax and selection colours.
Added in 0.5.0 for LSP diagnostic inline rendering.
Fields§
§row: usize0-based document row.
col_start: usize0-based start char-column (inclusive).
col_end: usize0-based end char-column (exclusive).
style: StyleStyle applied to cells in [col_start, col_end).
Trait Implementations§
Source§impl Clone for DiagOverlay
impl Clone for DiagOverlay
Source§fn clone(&self) -> DiagOverlay
fn clone(&self) -> DiagOverlay
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DiagOverlay
impl Debug for DiagOverlay
impl Copy for DiagOverlay
Auto Trait Implementations§
impl Freeze for DiagOverlay
impl RefUnwindSafe for DiagOverlay
impl Send for DiagOverlay
impl Sync for DiagOverlay
impl Unpin for DiagOverlay
impl UnsafeUnpin for DiagOverlay
impl UnwindSafe for DiagOverlay
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more