pub struct ScopeInfo {
pub scopes: Vec<Option<OriginalScope>>,
pub ranges: Vec<GeneratedRange>,
}Expand description
Decoded scope information from a source map.
Fields§
§scopes: Vec<Option<OriginalScope>>Original scope trees, one per source file (aligned with sources).
None means no scope info for that source file.
ranges: Vec<GeneratedRange>Top-level generated ranges for the output code.
Implementations§
Source§impl ScopeInfo
impl ScopeInfo
Sourcepub fn original_scope_for_definition(
&self,
definition: usize,
) -> Option<&OriginalScope>
pub fn original_scope_for_definition( &self, definition: usize, ) -> Option<&OriginalScope>
Get the original scope referenced by a generated range’s definition index.
The definition index references scopes in pre-order traversal order across all source files.
Trait Implementations§
impl Eq for ScopeInfo
impl StructuralPartialEq for ScopeInfo
Auto Trait Implementations§
impl Freeze for ScopeInfo
impl RefUnwindSafe for ScopeInfo
impl Send for ScopeInfo
impl Sync for ScopeInfo
impl Unpin for ScopeInfo
impl UnsafeUnpin for ScopeInfo
impl UnwindSafe for ScopeInfo
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