pub struct LineOffsetTable { /* private fields */ }Expand description
Converts byte offsets in source text to LSP Position values.
Precomputes line-start byte offsets once, then maps any byte offset to a
(line, character) position. Characters are counted as UTF-16 code units
as required by the LSP specification.
Implementations§
Auto Trait Implementations§
impl Freeze for LineOffsetTable
impl RefUnwindSafe for LineOffsetTable
impl Send for LineOffsetTable
impl Sync for LineOffsetTable
impl Unpin for LineOffsetTable
impl UnsafeUnpin for LineOffsetTable
impl UnwindSafe for LineOffsetTable
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