pub struct Document { /* private fields */ }Implementations§
Source§impl Document
impl Document
Sourcepub fn new(id: usize) -> Self
pub fn new(id: usize) -> Self
The id must be unique among documents that merge with each other.
pub fn text(&self) -> String
pub fn insert(&mut self, byte_index: usize, text: &str) -> Result<()>
pub fn delete(&mut self, byte_range: Range<usize>) -> Result<()>
pub fn merge(&mut self, other: &Self)
Auto Trait Implementations§
impl Freeze for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnsafeUnpin for Document
impl UnwindSafe for Document
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