pub struct Project { /* private fields */ }Implementations§
Source§impl Project
impl Project
pub fn new(vhdl_standard: VHDLStandard) -> Project
pub fn enable_unused_declaration_detection(&mut self)
pub fn enable_sensitivity_list_linting(&mut self)
pub fn enable_all_linters(&mut self)
Sourcepub fn from_config(config: Config, messages: &mut dyn MessageHandler) -> Project
pub fn from_config(config: Config, messages: &mut dyn MessageHandler) -> Project
Create instance from given configuration. Files referred by configuration are parsed into corresponding libraries.
Sourcepub fn update_config(
&mut self,
config: Config,
messages: &mut dyn MessageHandler,
)
pub fn update_config( &mut self, config: Config, messages: &mut dyn MessageHandler, )
Replace active project configuration. The design state is reset, new files are added and parsed. Existing source files will be kept and parsed from in-memory source (required for incremental document updates).
pub fn library_mapping_of(&self, source: &Source) -> Vec<Symbol>
pub fn get_source(&self, file_name: &Path) -> Option<Source>
pub fn update_source(&mut self, source: &Source)
pub fn analyse(&mut self) -> Vec<Diagnostic>
Sourcepub fn find_definition(
&self,
source: &Source,
cursor: Position,
) -> Option<EntRef<'_>>
pub fn find_definition( &self, source: &Source, cursor: Position, ) -> Option<EntRef<'_>>
Search for reference at position
Character offset on a line in a document (zero-based). Assuming that the line is
represented as a string, the character value represents the gap between the
character and character + 1.
If the character value is greater than the line length it defaults back to the line length.
pub fn find_declaration( &self, source: &Source, cursor: Position, ) -> Option<EntRef<'_>>
pub fn item_at_cursor( &self, source: &Source, cursor: Position, ) -> Option<(SrcPos, EntRef<'_>)>
pub fn search(&self, searcher: &mut impl Searcher)
pub fn public_symbols<'a>(&'a self) -> Box<dyn Iterator<Item = EntRef<'a>> + 'a>
pub fn document_symbols<'a>( &'a self, library_name: &Symbol, source: &Source, ) -> Vec<(EntHierarchy<'a>, &'a Vec<Token>)>
pub fn find_implementation( &self, source: &Source, cursor: Position, ) -> Vec<EntRef<'_>> ⓘ
Sourcepub fn format_declaration(&self, ent: EntRef<'_>) -> Option<String>
pub fn format_declaration(&self, ent: EntRef<'_>) -> Option<String>
Search for the declaration at decl_pos and format it
pub fn format_entity(&self, id: EntityId) -> Option<String>
Sourcepub fn find_all_references(&self, ent: EntRef<'_>) -> Vec<SrcPos>
pub fn find_all_references(&self, ent: EntRef<'_>) -> Vec<SrcPos>
Search for all references to the declaration at decl_pos
pub fn find_all_references_in_source( &self, source: &Source, ent: EntRef<'_>, ) -> Vec<SrcPos>
Sourcepub fn find_all_unresolved(&self) -> (usize, Vec<SrcPos>)
pub fn find_all_unresolved(&self) -> (usize, Vec<SrcPos>)
Get source positions that are not resolved to a declaration This is used for development to test where the language server is blind
pub fn files(&self) -> impl Iterator<Item = &SourceFile>
pub fn list_completion_options( &self, source: &Source, cursor: Position, ) -> Vec<CompletionItem<'_>>
pub fn entity_id_from_raw(&self, raw: usize) -> Option<EntityId>
Auto Trait Implementations§
impl !Freeze for Project
impl !RefUnwindSafe for Project
impl Send for Project
impl Sync for Project
impl Unpin for Project
impl !UnwindSafe for Project
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more