pub struct QuickJsSourceIndex<'source> { /* private fields */ }Expand description
Source-owned coordinate index shared across all functions in one lowering. Construction is O(source bytes); each query scans at most 255 bytes after an O(1) checkpoint lookup. Storage is eight bytes per 256 source bytes, excluding Vec metadata/capacity. Long single-line sources remain bounded.
Implementations§
Source§impl<'source> QuickJsSourceIndex<'source>
impl<'source> QuickJsSourceIndex<'source>
pub fn locate( &self, offset: SourceOffset, ) -> Result<LineColumn, DebugMetadataError>
pub fn locate_byte_offset( &self, byte_offset: usize, ) -> Result<LineColumn, DebugMetadataError>
Trait Implementations§
Auto Trait Implementations§
impl<'source> Freeze for QuickJsSourceIndex<'source>
impl<'source> RefUnwindSafe for QuickJsSourceIndex<'source>
impl<'source> Send for QuickJsSourceIndex<'source>
impl<'source> Sync for QuickJsSourceIndex<'source>
impl<'source> Unpin for QuickJsSourceIndex<'source>
impl<'source> UnsafeUnpin for QuickJsSourceIndex<'source>
impl<'source> UnwindSafe for QuickJsSourceIndex<'source>
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