pub struct SemanticModel {
pub tables: HashMap<String, SymbolInfo>,
pub columns: HashMap<String, Vec<SymbolInfo>>,
pub enums: HashMap<String, SymbolInfo>,
pub errors: Vec<SemanticError>,
}Fields§
§tables: HashMap<String, SymbolInfo>§columns: HashMap<String, Vec<SymbolInfo>>§enums: HashMap<String, SymbolInfo>§errors: Vec<SemanticError>Implementations§
Source§impl SemanticModel
impl SemanticModel
pub fn new() -> Self
pub fn analyze(document: &Document) -> Self
pub fn find_symbol_at_position(&self, pos: usize) -> Option<&SymbolInfo>
Sourcepub fn find_definition_at_position(
&self,
pos: usize,
ast: &Document,
) -> Option<SymbolInfo>
pub fn find_definition_at_position( &self, pos: usize, ast: &Document, ) -> Option<SymbolInfo>
Find the definition location for a symbol at the given position Returns the target symbol info (where to jump to)
pub fn to_diagnostics(&self, content: &str) -> Vec<Diagnostic>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SemanticModel
impl RefUnwindSafe for SemanticModel
impl Send for SemanticModel
impl Sync for SemanticModel
impl Unpin 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