pub enum MarkOp {
Add {
start: usize,
end: usize,
kind: MarkKind,
},
Remove {
start: usize,
end: usize,
kind: MarkKind,
},
RemoveAnchor {
id: String,
},
}Expand description
A mark edit in final-text coordinates (post-delta, post-line-op).
Variants§
Add
Add a mark over [start, end).
Remove
Un-format kind over [start, end): subtract the range from each
overlapping same-kind formatting mark, keeping the non-overlapping
fragments (a mid-run removal punches a hole; normalize drops any
zero-width fragment an edge-aligned removal leaves). Non-formatting
(identity/unknown) handles can’t be range-fragmented, so an overlapping
one is dropped whole — anchors normally go through MarkOp::RemoveAnchor.
RemoveAnchor
Drop one identity anchor by id.
Trait Implementations§
impl StructuralPartialEq for MarkOp
Auto Trait Implementations§
impl Freeze for MarkOp
impl RefUnwindSafe for MarkOp
impl Send for MarkOp
impl Sync for MarkOp
impl Unpin for MarkOp
impl UnsafeUnpin for MarkOp
impl UnwindSafe for MarkOp
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