pub struct TextBuffer { /* private fields */ }
Implementations§
Source§impl TextBuffer
impl TextBuffer
pub fn empty() -> Self
pub fn with_lines<S: AsRef<str>, I: Iterator<Item = S>>( lines: I, ) -> Result<Self>
pub fn open<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn finish_edit(&mut self) -> Option<usize>
pub fn insert_char(&mut self, ch: char)
pub fn insert_tab(&mut self)
pub fn delete_char(&mut self)
pub fn delete_until_end_of_line(&mut self)
pub fn delete_until_head_of_line(&mut self)
pub fn delete_word(&mut self)
pub fn delete_right_char(&mut self)
pub fn insert_line(&mut self)
pub fn move_cursor_one(&mut self, dir: CursorDir)
pub fn move_cursor_page( &mut self, dir: CursorDir, rowoff: usize, num_rows: usize, )
pub fn move_cursor_to_buffer_edge(&mut self, dir: CursorDir)
pub fn move_cursor_by_word(&mut self, dir: CursorDir)
pub fn move_cursor_paragraph(&mut self, dir: CursorDir)
pub fn rows(&self) -> &[Row]
pub fn has_file(&self) -> bool
pub fn filename(&self) -> &str
pub fn modified(&self) -> bool
pub fn lang(&self) -> Language
pub fn cy(&self) -> usize
pub fn lines(&self) -> Lines<'_> ⓘ
pub fn set_file<S: Into<String>>(&mut self, file_path: S)
pub fn set_unnamed(&mut self)
pub fn set_lang(&mut self, lang: Language)
pub fn save(&mut self) -> Result<String, String>
pub fn set_cursor(&mut self, x: usize, y: usize)
pub fn cursor(&self) -> (usize, usize)
pub fn undo(&mut self) -> bool
pub fn redo(&mut self) -> bool
pub fn is_scratch(&self) -> bool
Auto Trait Implementations§
impl Freeze for TextBuffer
impl RefUnwindSafe for TextBuffer
impl Send for TextBuffer
impl Sync for TextBuffer
impl Unpin for TextBuffer
impl UnwindSafe for TextBuffer
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