Struct cosmic_text::Editor
source · pub struct Editor<'a> {
pub buffer: Buffer<'a>,
/* private fields */
}Expand description
A wrapper of Buffer for easy editing
Fields
buffer: Buffer<'a>Implementations
sourceimpl<'a> Editor<'a>
impl<'a> Editor<'a>
sourcepub fn shape_as_needed(&mut self)
pub fn shape_as_needed(&mut self)
Shape lines until scroll, after adjusting scroll if the cursor moved
sourcepub fn copy_selection(&mut self) -> Option<String>
pub fn copy_selection(&mut self) -> Option<String>
Copy selection
sourcepub fn delete_selection(&mut self) -> bool
pub fn delete_selection(&mut self) -> bool
Delete selection, adjusting cursor and returning true if there was a selection
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Editor<'a>
impl<'a> Send for Editor<'a>
impl<'a> Sync for Editor<'a>
impl<'a> Unpin for Editor<'a>
impl<'a> !UnwindSafe for Editor<'a>
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