pub struct Project { /* private fields */ }
Implementations§
Source§impl Project
impl Project
pub fn new() -> Project
pub fn from_config( config: &Config, messages: &mut dyn MessageHandler, ) -> Project
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 search_reference(
&self,
source: &Source,
cursor: Position,
) -> Option<SrcPos>
pub fn search_reference( &self, source: &Source, cursor: Position, ) -> Option<SrcPos>
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_all_references(&self, decl_pos: &SrcPos) -> Vec<SrcPos>
Trait Implementations§
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
Mutably borrows from an owned value. Read more