Struct kiro_editor::TextBuffer[][src]

pub struct TextBuffer { /* fields omitted */ }

Implementations

impl TextBuffer[src]

pub fn empty() -> Self[src]

pub fn with_lines<S: AsRef<str>, I: Iterator<Item = S>>(
    lines: I
) -> Result<Self>
[src]

pub fn open<P: AsRef<Path>>(path: P) -> Result<Self>[src]

pub fn finish_edit(&mut self) -> Option<usize>[src]

pub fn insert_char(&mut self, ch: char)[src]

pub fn insert_tab(&mut self)[src]

pub fn delete_char(&mut self)[src]

pub fn delete_until_end_of_line(&mut self)[src]

pub fn delete_until_head_of_line(&mut self)[src]

pub fn delete_word(&mut self)[src]

pub fn delete_right_char(&mut self)[src]

pub fn insert_line(&mut self)[src]

pub fn move_cursor_one(&mut self, dir: CursorDir)[src]

pub fn move_cursor_page(
    &mut self,
    dir: CursorDir,
    rowoff: usize,
    num_rows: usize
)
[src]

pub fn move_cursor_to_buffer_edge(&mut self, dir: CursorDir)[src]

pub fn move_cursor_by_word(&mut self, dir: CursorDir)[src]

pub fn move_cursor_paragraph(&mut self, dir: CursorDir)[src]

pub fn rows(&self) -> &[Row][src]

pub fn has_file(&self) -> bool[src]

pub fn filename(&self) -> &str[src]

pub fn modified(&self) -> bool[src]

pub fn lang(&self) -> Language[src]

pub fn cy(&self) -> usize[src]

pub fn lines(&self) -> Lines<'_>

Notable traits for Lines<'a>

impl<'a> Iterator for Lines<'a> type Item = &'a str;
[src]

pub fn set_file<S: Into<String>>(&mut self, file_path: S)[src]

pub fn set_unnamed(&mut self)[src]

pub fn set_lang(&mut self, lang: Language)[src]

pub fn save(&mut self) -> Result<String, String>[src]

pub fn set_cursor(&mut self, x: usize, y: usize)[src]

pub fn cursor(&self) -> (usize, usize)[src]

pub fn undo(&mut self) -> bool[src]

pub fn redo(&mut self) -> bool[src]

pub fn is_scratch(&self) -> bool[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.