Struct vhdl_lang::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 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>, &Vec<Token>)>

source

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

source

pub fn format_declaration(&self, ent: &AnyEnt<'_>) -> 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: &AnyEnt<'_>) -> Vec<SrcPos>

Search for all references to the declaration at decl_pos

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<'_>>

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

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>,

§

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>,

§

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.