pub struct UndoStack { /* private fields */ }Implementations§
Source§impl UndoStack
impl UndoStack
pub fn new(limit: usize) -> Self
pub fn coalesce_window(self, window: Duration) -> Self
pub fn set_limit(&mut self, limit: usize)
pub fn can_undo(&self) -> bool
pub fn can_redo(&self) -> bool
pub fn undo_len(&self) -> usize
pub fn redo_len(&self) -> usize
pub fn clear(&mut self)
pub fn push_insert(&mut self, pos: usize, text: &str)
pub fn push_delete(&mut self, pos: usize, text: &str)
pub fn push_group(&mut self, group: UndoGroup)
pub fn push_attr_change( &mut self, range: Range<usize>, before: Vec<StyledSpan>, after: Vec<StyledSpan>, )
pub fn undo(&mut self, buf: &mut TextBuffer) -> Option<(usize, usize)>
pub fn redo(&mut self, buf: &mut TextBuffer) -> Option<(usize, usize)>
pub fn undo_styled(&mut self, buf: &mut StyledBuffer) -> Option<(usize, usize)>
pub fn redo_styled(&mut self, buf: &mut StyledBuffer) -> Option<(usize, usize)>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UndoStack
impl RefUnwindSafe for UndoStack
impl Send for UndoStack
impl Sync for UndoStack
impl Unpin for UndoStack
impl UnsafeUnpin for UndoStack
impl UnwindSafe for UndoStack
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