pub struct LuaModuleIndex { /* private fields */ }Implementations§
Source§impl LuaModuleIndex
impl LuaModuleIndex
pub fn new() -> Self
pub fn set_module_extract_patterns(&mut self, patterns: Vec<String>)
pub fn set_module_replace_patterns(&mut self, patterns: HashMap<String, String>)
pub fn add_module_by_path( &mut self, file_id: FileId, path: &str, ) -> Option<WorkspaceId>
pub fn add_module_by_module_path( &mut self, file_id: FileId, module_path: String, workspace_id: WorkspaceId, ) -> Option<()>
pub fn get_module(&self, file_id: FileId) -> Option<&ModuleInfo>
pub fn get_module_mut(&mut self, file_id: FileId) -> Option<&mut ModuleInfo>
pub fn set_module_visibility(&mut self, file_id: FileId, visible: bool)
pub fn set_module_version_conds( &mut self, file_id: FileId, version_conds: Vec<LuaVersionCondition>, )
pub fn find_module(&self, module_path: &str) -> Option<&ModuleInfo>
Sourcepub fn find_module_node(&self, module_path: &str) -> Option<&ModuleNode>
pub fn find_module_node(&self, module_path: &str) -> Option<&ModuleNode>
Find a module node by module path. The module path is a string separated by dots. For example, “a.b.c” represents the module “c” in the module “b” in the module “a”.
pub fn get_module_node(&self, module_id: &ModuleNodeId) -> Option<&ModuleNode>
pub fn get_module_infos(&self) -> Vec<&ModuleInfo>
pub fn extract_module_path(&self, path: &str) -> Option<(String, WorkspaceId)>
pub fn match_pattern(&self, path: &str) -> Option<String>
pub fn add_workspace_root(&mut self, root: PathBuf, workspace_id: WorkspaceId)
pub fn remove_workspace_root(&mut self, root: &Path)
pub fn update_config(&mut self, config: Arc<Emmyrc>)
pub fn get_std_file_ids(&self) -> Vec<FileId>
pub fn is_main(&self, file_id: &FileId) -> bool
pub fn is_std(&self, file_id: &FileId) -> bool
pub fn is_library(&self, file_id: &FileId) -> bool
pub fn get_main_workspace_file_ids(&self) -> Vec<FileId>
pub fn get_lib_file_ids(&self) -> Vec<FileId>
pub fn set_meta(&mut self, file_id: FileId)
pub fn is_meta_file(&self, file_id: &FileId) -> bool
pub fn get_workspace_id(&self, file_id: FileId) -> Option<WorkspaceId>
Trait Implementations§
Source§impl Debug for LuaModuleIndex
impl Debug for LuaModuleIndex
Auto Trait Implementations§
impl Freeze for LuaModuleIndex
impl RefUnwindSafe for LuaModuleIndex
impl Send for LuaModuleIndex
impl Sync for LuaModuleIndex
impl Unpin for LuaModuleIndex
impl UnwindSafe for LuaModuleIndex
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
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>
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 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>
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