pub enum TextOffset {
Offset(usize),
End(CaretDirection),
}Expand description
An offset into a text node: a number of UTF-16 code units, or the end
in a direction ('next' is the end, 'previous' the start), as JS’s
number | CaretDirection.
Variants§
Offset(usize)
End(CaretDirection)
Trait Implementations§
Source§impl Clone for TextOffset
impl Clone for TextOffset
impl Copy for TextOffset
Source§impl Debug for TextOffset
impl Debug for TextOffset
impl Eq for TextOffset
Source§impl From<CaretDirection> for TextOffset
impl From<CaretDirection> for TextOffset
Source§fn from(direction: CaretDirection) -> Self
fn from(direction: CaretDirection) -> Self
Converts to this type from the input type.
Source§impl From<usize> for TextOffset
impl From<usize> for TextOffset
Source§impl PartialEq for TextOffset
impl PartialEq for TextOffset
impl StructuralPartialEq for TextOffset
Auto Trait Implementations§
impl Forget for TextOffset
impl Freeze for TextOffset
impl Move for TextOffset
impl RefUnwindSafe for TextOffset
impl Send for TextOffset
impl Sync for TextOffset
impl Unpin for TextOffset
impl UnsafeUnpin for TextOffset
impl UnwindSafe for TextOffset
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