pub enum Selection {
Text {
anchor: usize,
head: usize,
},
Node {
pos: usize,
},
Cell {
anchor: usize,
head: usize,
},
All,
}Expand description
What is currently selected.
Variants§
Text
A (possibly empty) text range. anchor is the fixed side, head the
moving side; they may be in either order.
Node
A single node selected as a unit, starting at pos.
Cell
A rectangular range of table cells. anchor and head are the
positions directly before the anchor and head cell nodes; the
covered rectangle is whatever table-aware code derives from them.
core treats this generically (for from/to/map); the table
extension interprets the rectangle.
Fields
All
The whole document.
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 UnsafeUnpin 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