pub struct CursorOperations;
Implementations§
Source§impl CursorOperations
impl CursorOperations
Sourcepub fn find_word_boundary_backward(text: &str, cursor_pos: usize) -> usize
pub fn find_word_boundary_backward(text: &str, cursor_pos: usize) -> usize
Move cursor to the previous word boundary
Sourcepub fn find_word_boundary_forward(text: &str, cursor_pos: usize) -> usize
pub fn find_word_boundary_forward(text: &str, cursor_pos: usize) -> usize
Move cursor to the next word boundary
Sourcepub fn delete_word_backward(text: &str, cursor_pos: usize) -> (String, usize)
pub fn delete_word_backward(text: &str, cursor_pos: usize) -> (String, usize)
Delete from cursor to previous word boundary
Sourcepub fn delete_word_forward(text: &str, cursor_pos: usize) -> (String, usize)
pub fn delete_word_forward(text: &str, cursor_pos: usize) -> (String, usize)
Delete from cursor to next word boundary
Sourcepub fn kill_line(text: &str, cursor_pos: usize) -> (String, String)
pub fn kill_line(text: &str, cursor_pos: usize) -> (String, String)
Kill line from cursor to end
Sourcepub fn kill_line_backward(
text: &str,
cursor_pos: usize,
) -> (String, String, usize)
pub fn kill_line_backward( text: &str, cursor_pos: usize, ) -> (String, String, usize)
Kill line from start to cursor
Sourcepub fn jump_to_prev_token(text: &str, cursor_pos: usize) -> usize
pub fn jump_to_prev_token(text: &str, cursor_pos: usize) -> usize
Jump to previous SQL token
Sourcepub fn jump_to_next_token(text: &str, cursor_pos: usize) -> usize
pub fn jump_to_next_token(text: &str, cursor_pos: usize) -> usize
Jump to next SQL token
Auto Trait Implementations§
impl Freeze for CursorOperations
impl RefUnwindSafe for CursorOperations
impl Send for CursorOperations
impl Sync for CursorOperations
impl Unpin for CursorOperations
impl UnwindSafe for CursorOperations
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more