pub struct CheckpointCache { /* private fields */ }Expand description
A checkpoint cache for efficient incremental parsing
Implementations§
Source§impl CheckpointCache
impl CheckpointCache
Sourcepub fn add(&mut self, checkpoint: LexerCheckpoint)
pub fn add(&mut self, checkpoint: LexerCheckpoint)
Add a checkpoint to the cache
Sourcepub fn find_before(&self, position: usize) -> Option<&LexerCheckpoint>
pub fn find_before(&self, position: usize) -> Option<&LexerCheckpoint>
Find the nearest checkpoint before a given position
Sourcepub fn apply_edit(&mut self, start: usize, old_len: usize, new_len: usize)
pub fn apply_edit(&mut self, start: usize, old_len: usize, new_len: usize)
Apply an edit to all cached checkpoints
Auto Trait Implementations§
impl Freeze for CheckpointCache
impl RefUnwindSafe for CheckpointCache
impl Send for CheckpointCache
impl Sync for CheckpointCache
impl Unpin for CheckpointCache
impl UnsafeUnpin for CheckpointCache
impl UnwindSafe for CheckpointCache
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