pub struct Selection {
pub cursor: Cursor,
pub anchor: Position,
}
Fields§
§cursor: Cursor
§anchor: Position
Implementations§
Source§impl Selection
impl Selection
pub fn is_empty(self) -> bool
pub fn overlaps_with(self, other: Self) -> bool
pub fn start(self) -> Position
pub fn start_affinity(self) -> Affinity
pub fn end(self) -> Position
pub fn end_affinity(self) -> Affinity
pub fn length(self) -> Length
pub fn line_range(self) -> Range<usize>
pub fn update_cursor(self, f: impl FnOnce(Cursor) -> Cursor) -> Self
pub fn reset_anchor(self) -> Self
pub fn merge_with(self, other: Self) -> Option<Self>
pub fn apply_edit(self, edit: &Edit) -> Self
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> ActionTrait for T
impl<T> ActionTrait for T
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