pub struct Analysis {
pub diagnostics: Vec<Diagnostic>,
pub bindings: Vec<Binding>,
pub references: Vec<Reference>,
}Expand description
The result of analyze.
Fields§
§diagnostics: Vec<Diagnostic>The problems check reports.
bindings: Vec<Binding>Constants, group parameters and rule aliases, in the order they are declared.
references: Vec<Reference>The names that refer to something, ordered by position.
Implementations§
Source§impl Analysis
impl Analysis
Sourcepub fn reference_at(&self, offset: TextSize) -> Option<&Reference>
pub fn reference_at(&self, offset: TextSize) -> Option<&Reference>
The reference whose name covers offset, or ends at it (the cursor right after a name).
Sourcepub fn binding_at(&self, offset: TextSize) -> Option<(usize, &Binding)>
pub fn binding_at(&self, offset: TextSize) -> Option<(usize, &Binding)>
The variable declared at offset.
Sourcepub fn bindings_at(&self, offset: TextSize) -> Vec<&Binding>
pub fn bindings_at(&self, offset: TextSize) -> Vec<&Binding>
The variables that can be used at offset, the innermost one for each name.
Sourcepub fn references_to(&self, binding: usize) -> impl Iterator<Item = &Reference>
pub fn references_to(&self, binding: usize) -> impl Iterator<Item = &Reference>
The references to the variable binding.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Analysis
impl Freeze for Analysis
impl RefUnwindSafe for Analysis
impl Send for Analysis
impl Sync for Analysis
impl Unpin for Analysis
impl UnsafeUnpin for Analysis
impl UnwindSafe for Analysis
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