pub struct TextMut<'a> { /* private fields */ }Expand description
Mutable reference to a Text CRDT.
Obtained through Transaction::get_text_mut() or Transaction::text_by_id().
Implementations§
Source§impl<'a> TextMut<'a>
impl<'a> TextMut<'a>
Sourcepub fn insert(&mut self, pos: usize, content: &str)
pub fn insert(&mut self, pos: usize, content: &str)
Insert text at a position.
Position is in Unicode characters (not bytes).
Sourcepub fn delete(&mut self, range: Range<usize>)
pub fn delete(&mut self, range: Range<usize>)
Delete a range of text.
Range is in Unicode characters (not bytes).
Auto Trait Implementations§
impl<'a> Freeze for TextMut<'a>
impl<'a> RefUnwindSafe for TextMut<'a>
impl<'a> Send for TextMut<'a>
impl<'a> Sync for TextMut<'a>
impl<'a> Unpin for TextMut<'a>
impl<'a> UnsafeUnpin for TextMut<'a>
impl<'a> !UnwindSafe for TextMut<'a>
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