pub struct Cursors { /* private fields */ }Expand description
One editor’s selections, plus the model version they are valid for.
Implementations§
Source§impl Cursors
impl Cursors
pub fn new(id: EditorId, model: &TextModel) -> Self
pub fn id(&self) -> EditorId
Sourcepub fn snippet_active(&self) -> bool
pub fn snippet_active(&self) -> bool
Whether a snippet is being filled in.
Sourcepub fn selections(&self) -> &Selections
pub fn selections(&self) -> &Selections
The selections as of the last Cursors::sync. Call sync first when another
editor may have changed the model.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Cursors
impl Freeze for Cursors
impl Move for Cursors
impl RefUnwindSafe for Cursors
impl Send for Cursors
impl Sync for Cursors
impl Unpin for Cursors
impl UnsafeUnpin for Cursors
impl UnwindSafe for Cursors
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