pub struct SemanticModel { /* private fields */ }Expand description
The immutable product of semantic analysis.
Implementations§
Source§impl SemanticModel
impl SemanticModel
Sourcepub const fn module_scope(&self) -> ScopeId
pub const fn module_scope(&self) -> ScopeId
Returns the top-level module scope.
Sourcepub fn symbol_type(&self, id: SymbolId) -> TypeId
pub fn symbol_type(&self, id: SymbolId) -> TypeId
Returns the declared or inferred type of a bound name.
Sourcepub const fn facts(&self) -> &AnalysisFacts
pub const fn facts(&self) -> &AnalysisFacts
Returns the immutable semantic evidence consumed by lint rules.
Sourcepub fn reference(&self, node: NodeId) -> Option<SymbolId>
pub fn reference(&self, node: NodeId) -> Option<SymbolId>
Returns the symbol an identifier reference resolved to, if any.
Sourcepub fn resolved_reference_count(&self) -> usize
pub fn resolved_reference_count(&self) -> usize
Returns how many identifier references resolved to a local binding.
Trait Implementations§
Source§impl Clone for SemanticModel
impl Clone for SemanticModel
Source§fn clone(&self) -> SemanticModel
fn clone(&self) -> SemanticModel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SemanticModel
impl RefUnwindSafe for SemanticModel
impl Send for SemanticModel
impl Sync for SemanticModel
impl Unpin for SemanticModel
impl UnsafeUnpin for SemanticModel
impl UnwindSafe for SemanticModel
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