pub struct CursorSet { /* private fields */ }Expand description
Collection of cursors (always has at least one - the primary cursor)
Implementations§
Source§impl CursorSet
impl CursorSet
Sourcepub fn primary_mut(&mut self) -> &mut Cursor
pub fn primary_mut(&mut self) -> &mut Cursor
Get the primary cursor (mutable)
Sourcepub fn clear_secondary(&mut self)
pub fn clear_secondary(&mut self)
Clear all secondary cursors, keeping only the primary
Sourcepub fn set_primary(&mut self, pos: CursorPos)
pub fn set_primary(&mut self, pos: CursorPos)
Set the primary cursor position
Sourcepub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Cursor>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Cursor>
Iterate over all cursors (mutable)
Sourcepub fn positions_reversed(&self) -> Vec<CursorPos>
pub fn positions_reversed(&self) -> Vec<CursorPos>
Get positions of all cursors sorted in reverse order (for editing)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CursorSet
impl RefUnwindSafe for CursorSet
impl Send for CursorSet
impl Sync for CursorSet
impl Unpin for CursorSet
impl UnsafeUnpin for CursorSet
impl UnwindSafe for CursorSet
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