pub struct AtPosition<'a> { /* private fields */ }Expand description
Fluent API builder for document operations at a specific position
Implementations§
Source§impl<'a> AtPosition<'a>
impl<'a> AtPosition<'a>
Sourcepub fn insert_text(self, text: &str) -> Result<&'a mut EditorDocument>
pub fn insert_text(self, text: &str) -> Result<&'a mut EditorDocument>
Insert text at the current position
Sourcepub fn insert_line(self) -> Result<&'a mut EditorDocument>
pub fn insert_line(self) -> Result<&'a mut EditorDocument>
Insert a line break at the current position
Sourcepub fn delete(self, count: usize) -> Result<&'a mut EditorDocument>
pub fn delete(self, count: usize) -> Result<&'a mut EditorDocument>
Delete a number of characters forward from position
Sourcepub fn backspace(self, count: usize) -> Result<&'a mut EditorDocument>
pub fn backspace(self, count: usize) -> Result<&'a mut EditorDocument>
Delete characters backward from position (backspace)
Sourcepub fn replace_to_line_end(self, text: &str) -> Result<&'a mut EditorDocument>
pub fn replace_to_line_end(self, text: &str) -> Result<&'a mut EditorDocument>
Replace text from position to end of line
Sourcepub fn to_line_column(&self) -> Result<(usize, usize)>
Available on crate feature rope only.
pub fn to_line_column(&self) -> Result<(usize, usize)>
rope only.Convert position to line/column
Auto Trait Implementations§
impl<'a> Freeze for AtPosition<'a>
impl<'a> !RefUnwindSafe for AtPosition<'a>
impl<'a> Send for AtPosition<'a>
impl<'a> !Sync for AtPosition<'a>
impl<'a> Unpin for AtPosition<'a>
impl<'a> !UnwindSafe for AtPosition<'a>
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