pub struct TextBuffer {
pub filter: TextBufferFilter,
/* private fields */
}Fields§
§filter: TextBufferFilterImplementations§
Source§impl TextBuffer
impl TextBuffer
pub fn new() -> Self
pub fn get_char_at(&self, pos: TextPosition) -> Option<char>
pub fn lines(&self) -> impl '_ + Iterator<Item = &str>
pub fn cols(&self, row: usize) -> usize
pub fn prev_col(&self, _: TextPosition) -> usize
pub fn next_col(&self, _: TextPosition) -> usize
pub fn rows(&self) -> usize
pub fn set_text(&mut self, text: String)
pub fn update(&mut self, pos: TextPosition, new: char) -> bool
pub fn update_bulk( &mut self, updates: impl Iterator<Item = (TextPosition, char)>, ) -> bool
pub fn undo(&mut self) -> Option<usize>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TextBuffer
impl RefUnwindSafe for TextBuffer
impl Send for TextBuffer
impl Sync for TextBuffer
impl Unpin for TextBuffer
impl UnsafeUnpin 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