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
Source§fn clone(&self) -> CursorState
fn clone(&self) -> CursorState
Returns a duplicate of the value. Read more
1.0.0 · 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 CursorState
impl RefUnwindSafe for CursorState
impl Send for CursorState
impl Sync for CursorState
impl Unpin for CursorState
impl UnwindSafe for CursorState
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