pub struct SyntaxIndex { /* private fields */ }Expand description
Compact Heddle-owned syntax data for one parsed source file.
Implementations§
Source§impl SyntaxIndex
impl SyntaxIndex
pub fn functions<'a>( &'a self, source: &'a str, ) -> impl Iterator<Item = FunctionRef<'a>> + 'a
pub fn imports<'a>( &'a self, source: &'a str, ) -> impl Iterator<Item = ImportRef<'a>> + 'a
Sourcepub fn line_offsets(&self) -> &[usize]
pub fn line_offsets(&self) -> &[usize]
Byte offsets where each line starts. The first entry is always 0.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SyntaxIndex
impl RefUnwindSafe for SyntaxIndex
impl Send for SyntaxIndex
impl Sync for SyntaxIndex
impl Unpin for SyntaxIndex
impl UnsafeUnpin for SyntaxIndex
impl UnwindSafe for SyntaxIndex
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