pub enum HighlightsOp {
Replace(Vec<Vec<StyledSpan>>),
InsertAt {
start_line: u32,
spans: Vec<Vec<StyledSpan>>,
},
RemoveAt {
start_line: u32,
count: usize,
},
}Expand description
Entry in the pending highlights map: a full replacement, or a splice (insert or remove) that shifts every subsequent line’s spans to stay aligned with a text edit that inserted/removed lines at the same position.
Variants§
Replace(Vec<Vec<StyledSpan>>)
Replace the buffer’s whole highlight vector: one entry per line.
InsertAt
Splice spans in at start_line, shifting later lines down.
Fields
RemoveAt
Remove count lines of highlights at start_line, shifting later
lines up.
Trait Implementations§
Source§impl Clone for HighlightsOp
impl Clone for HighlightsOp
Source§fn clone(&self) -> HighlightsOp
fn clone(&self) -> HighlightsOp
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 moreAuto Trait Implementations§
impl Freeze for HighlightsOp
impl RefUnwindSafe for HighlightsOp
impl Send for HighlightsOp
impl Sync for HighlightsOp
impl Unpin for HighlightsOp
impl UnsafeUnpin for HighlightsOp
impl UnwindSafe for HighlightsOp
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