pub struct Selection {
pub anchor: Position,
pub cursor: Position,
}Expand description
Selection represents a range with a direction
The anchor is where the selection started, and the cursor is where it currently ends. This allows tracking selection direction.
Fields§
§anchor: PositionWhere the selection started
cursor: PositionWhere the selection cursor is
Implementations§
Trait Implementations§
impl Copy for Selection
impl Eq for Selection
impl StructuralPartialEq for Selection
Auto Trait Implementations§
impl Freeze for Selection
impl RefUnwindSafe for Selection
impl Send for Selection
impl Sync for Selection
impl Unpin for Selection
impl UnwindSafe for Selection
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