pub struct SimpleRope { /* private fields */ }Expand description
A rope-like structure for efficient incremental text editing.
Implementations§
Source§impl SimpleRope
impl SimpleRope
pub fn new(text: impl Into<String>) -> Self
pub fn as_string(&self) -> String
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn insert(&mut self, pos: usize, text: &str)
pub fn delete(&mut self, start: usize, end: usize)
pub fn chunk_count(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SimpleRope
impl RefUnwindSafe for SimpleRope
impl Send for SimpleRope
impl Sync for SimpleRope
impl Unpin for SimpleRope
impl UnsafeUnpin for SimpleRope
impl UnwindSafe for SimpleRope
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