pub struct Editor { /* private fields */ }
Expand description
Stateful editor executing changes to the underlying LineBuffer
In comparison to the state-less LineBuffer
the Editor
keeps track of
the undo/redo history and has facilities for cut/copy/yank/paste
Implementations
sourceimpl Editor
impl Editor
sourcepub fn line_buffer(&self) -> &LineBuffer
pub fn line_buffer(&self) -> &LineBuffer
Get the current LineBuffer
sourcepub fn get_buffer(&self) -> &str
pub fn get_buffer(&self) -> &str
Get the text of the current LineBuffer
sourcepub fn edit_buffer<F>(&mut self, func: F, undo_behavior: UndoBehavior)where
F: FnOnce(&mut LineBuffer),
pub fn edit_buffer<F>(&mut self, func: F, undo_behavior: UndoBehavior)where
F: FnOnce(&mut LineBuffer),
Edit the line buffer in an undo-safe manner.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Editor
impl Send for Editor
impl !Sync for Editor
impl Unpin for Editor
impl !UnwindSafe for Editor
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more