pub struct CursorState {
pub position: Position,
pub offset: usize,
pub multi_cursors: Vec<Position>,
pub selection: Option<Selection>,
pub selections: Vec<Selection>,
pub primary_selection_index: usize,
}Expand description
Cursor state
Fields§
§position: PositionPrimary cursor position (logical coordinates)
offset: usizePrimary cursor position (char offsets)
multi_cursors: Vec<Position>Multi-cursor list (active positions of secondary carets, excluding primary)
selection: Option<Selection>Primary selection range (only primary; returns None for empty selection)
selections: Vec<Selection>All selection set (including primary; each Selection may be empty)
primary_selection_index: usizeIndex of primary in selections
Trait Implementations§
Source§impl Clone for CursorState
impl Clone for CursorState
Auto Trait Implementations§
impl Forget for CursorState
impl Freeze for CursorState
impl Move for CursorState
impl RefUnwindSafe for CursorState
impl Send for CursorStatewhere
RawVecInner: Send,
impl Sync for CursorStatewhere
RawVecInner: Sync,
impl Unpin for CursorState
impl UnsafeUnpin for CursorStatewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Position>: UnsafeUnpin,
PhantomData<Selection>: UnsafeUnpin,
impl UnwindSafe for CursorStatewhere
RawVecInner: UnwindSafe,
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