pub struct Document { /* private fields */ }Implementations§
Source§impl Document
impl Document
pub fn new(id: usize) -> Self
pub fn from_str(id: usize, str: &str) -> Self
pub fn from_rope(id: usize, rope: Rope) -> Self
pub fn version(&self) -> Version
pub fn rope(&self) -> &Rope
pub fn commits(&self) -> &Vector<Commit>
pub fn create_snapshot(&self) -> Snapshot
pub fn create_draft(&self) -> Draft
pub fn apply_edit(&mut self, edit: Edit) -> Result<()>
pub fn apply_draft(&mut self, draft: Draft) -> Result<()>
pub fn create_anchor(&self, byte_index: usize, bias: Bias) -> Result<Anchor>
pub fn resolve_anchor(&self, anchor: Anchor) -> Result<usize>
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