Project

Struct Project 

Source
pub struct Project { /* private fields */ }

Implementations§

Source§

impl Project

Source

pub fn new(vhdl_standard: VHDLStandard) -> Project

Source

pub fn enable_unused_declaration_detection(&mut self)

Source

pub fn enable_sensitivity_list_linting(&mut self)

Source

pub fn enable_all_linters(&mut self)

Source

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.

Source

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).

Source

pub fn library_mapping_of(&self, source: &Source) -> Vec<Symbol>

Source

pub fn get_source(&self, file_name: &Path) -> Option<Source>

Source

pub fn update_source(&mut self, source: &Source)

Source

pub fn analyse(&mut self) -> Vec<Diagnostic>

Source

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.

Source

pub fn find_declaration( &self, source: &Source, cursor: Position, ) -> Option<EntRef<'_>>

Source

pub fn item_at_cursor( &self, source: &Source, cursor: Position, ) -> Option<(SrcPos, EntRef<'_>)>

Source

pub fn search(&self, searcher: &mut impl Searcher)

Source

pub fn public_symbols<'a>(&'a self) -> Box<dyn Iterator<Item = EntRef<'a>> + 'a>

Source

pub fn document_symbols<'a>( &'a self, library_name: &Symbol, source: &Source, ) -> Vec<(EntHierarchy<'a>, &'a Vec<Token>)>

Source

pub fn find_implementation( &self, source: &Source, cursor: Position, ) -> Vec<EntRef<'_>>

Source

pub fn format_declaration(&self, ent: EntRef<'_>) -> Option<String>

Search for the declaration at decl_pos and format it

Source

pub fn format_entity(&self, id: EntityId) -> Option<String>

Source

pub fn find_all_references(&self, ent: EntRef<'_>) -> Vec<SrcPos>

Search for all references to the declaration at decl_pos

Source

pub fn find_all_references_in_source( &self, source: &Source, ent: EntRef<'_>, ) -> Vec<SrcPos>

Source

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

Source

pub fn files(&self) -> impl Iterator<Item = &SourceFile>

Source

pub fn list_completion_options( &self, source: &Source, cursor: Position, ) -> Vec<CompletionItem<'_>>

Source

pub fn entity_id_from_raw(&self, raw: usize) -> Option<EntityId>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.