pub struct Cursor {
pub position: Position,
pub affinity: Affinity,
pub preferred_column_index: Option<usize>,
}
Fields§
§position: Position
§affinity: Affinity
§preferred_column_index: Option<usize>
Implementations§
Source§impl Cursor
impl Cursor
pub fn is_at_first_line(self) -> bool
pub fn is_at_last_line(self, line_count: usize) -> bool
pub fn is_at_start_of_line(self) -> bool
pub fn is_at_end_of_line(self, lines: &[String]) -> bool
pub fn is_at_first_row_of_line(self, layout: &Layout<'_>) -> bool
pub fn is_at_last_row_of_line(self, layout: &Layout<'_>) -> bool
pub fn move_left(self, lines: &[String]) -> Self
pub fn move_right(self, lines: &[String]) -> Self
pub fn move_up(self, layout: &Layout<'_>) -> Self
pub fn move_down(self, layout: &Layout<'_>) -> Self
pub fn home(self, lines: &[String]) -> Self
pub fn end(self, lines: &[String]) -> Self
pub fn move_to_end_of_line(self, lines: &[String]) -> Self
pub fn move_to_start_of_line(self) -> Self
pub fn move_to_file_start(self) -> Self
pub fn move_to_file_end(self, lines: &[String]) -> Self
pub fn move_to_prev_grapheme(self, lines: &[String]) -> Self
pub fn move_to_next_grapheme(self, lines: &[String]) -> Self
pub fn move_to_end_of_prev_line(self, lines: &[String]) -> Self
pub fn move_to_start_of_next_line(self) -> Self
pub fn move_to_prev_row_of_line(self, layout: &Layout<'_>) -> Self
pub fn move_to_next_row_of_line(self, layout: &Layout<'_>) -> Self
pub fn move_to_last_row_of_prev_line(self, layout: &Layout<'_>) -> Self
pub fn move_to_first_row_of_next_line(self, layout: &Layout<'_>) -> Self
pub fn apply_edit(self, edit: &Edit) -> Self
Trait Implementations§
impl Copy for Cursor
impl Eq for Cursor
impl StructuralPartialEq for Cursor
Auto Trait Implementations§
impl Freeze for Cursor
impl RefUnwindSafe for Cursor
impl Send for Cursor
impl Sync for Cursor
impl Unpin for Cursor
impl UnwindSafe for Cursor
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