pub struct Project {
pub file_contents: Querry<FileContents>,
pub syntax: Querry<Syntax>,
pub exports: Querry<Exports>,
pub bindings: Querry<Bindings>,
/* private fields */
}Expand description
Global project data
Fields§
§file_contents: Querry<FileContents>§syntax: Querry<Syntax>§exports: Querry<Exports>§bindings: Querry<Bindings>Implementations§
Source§impl Project
impl Project
pub fn new(root: Option<PathBuf>) -> Self
pub fn initialize(&mut self)
Sourcepub fn load_config(&mut self)
pub fn load_config(&mut self)
(Re)load project config files
pub fn lookup_file(&self, path: &Path) -> FileHandle
pub fn make_dummy_file(&mut self) -> FileHandle
pub fn get_file(&self, file: FileHandle) -> Arc<File>
pub fn get_pkg(&self, pkg: PkgHandle) -> &Package
Sourcepub fn try_pkg_for_file(&self, file: FileHandle) -> Option<PkgHandle>
pub fn try_pkg_for_file(&self, file: FileHandle) -> Option<PkgHandle>
Lookup a PkgHandle for a given source path.
Sourcepub fn pkg_for_file(&mut self, file: FileHandle) -> PkgHandle
pub fn pkg_for_file(&mut self, file: FileHandle) -> PkgHandle
Get a PkgHandle for a given source path, if one does not already exist, a dummy package will be created.
Sourcepub fn add_ovelay(&mut self, file: FileHandle, text: String)
pub fn add_ovelay(&mut self, file: FileHandle, text: String)
Used to manually control contents of file at given path. Aka.: this is where textDocument/did{Open,Change} notifications go
Sourcepub fn remove_overlay(&mut self, file: FileHandle)
pub fn remove_overlay(&mut self, file: FileHandle)
Remove overlay status for a file. Aka.: textDocument/didClose
pub fn file_contents( &self, file: FileHandle, as_pkg: PkgHandle, ) -> Arc<FileContents>
pub fn iter_packages(&self) -> impl Iterator<Item = PkgHandle>
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 UnsafeUnpin 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