pub struct IncrementalChangeResult {
pub changed_token_range: Range<usize>,
pub tokens: Vec<Token>,
pub is_stable: bool,
}Expand description
The result of an incremental re-lex triggered by a single text edit.
Fields§
§changed_token_range: Range<usize>Sub-range of tokens that was re-lexed.
Tokens with indices in changed_token_range are new; tokens outside
that range are (potentially shifted) copies from the old stream.
tokens: Vec<Token>Complete new token stream for the post-edit source.
is_stable: booltrue if the first unaffected token after the dirty region retained
the same start position after shifting — i.e. the re-lex did not
cascade further changes into the tail of the stream.
Trait Implementations§
Source§impl Clone for IncrementalChangeResult
impl Clone for IncrementalChangeResult
Source§fn clone(&self) -> IncrementalChangeResult
fn clone(&self) -> IncrementalChangeResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for IncrementalChangeResult
impl RefUnwindSafe for IncrementalChangeResult
impl Send for IncrementalChangeResult
impl Sync for IncrementalChangeResult
impl Unpin for IncrementalChangeResult
impl UnsafeUnpin for IncrementalChangeResult
impl UnwindSafe for IncrementalChangeResult
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