Struct erg_compiler::module::cache::SharedModuleCache
source · pub struct SharedModuleCache(_);
Implementations§
pub fn new() -> Self
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn get<Q: Eq + Hash + ?Sized>( &self, path: &Q ) -> Option<Ref<'_, ModuleEntry>>where PathBuf: Borrow<Q>,
pub fn get_mut<Q: Eq + Hash + ?Sized>( &self, path: &Q ) -> Option<RefMut<'_, ModuleEntry>>where PathBuf: Borrow<Q>,
pub fn get_ctx<Q: Eq + Hash + ?Sized>( &self, path: &Q ) -> Option<Rc<ModuleContext>>where PathBuf: Borrow<Q>,
pub fn ref_ctx<Q: Eq + Hash + ?Sized>( &self, path: &Q ) -> Option<Ref<'_, ModuleContext>>where PathBuf: Borrow<Q>,
pub fn raw_ref_ctx<Q: Eq + Hash + ?Sized>( &self, path: &Q ) -> Option<&ModuleContext>where PathBuf: Borrow<Q>,
pub fn register(&self, path: PathBuf, hir: Option<HIR>, ctx: ModuleContext)
pub fn remove<Q: Eq + Hash + ?Sized>(&self, path: &Q) -> Option<ModuleEntry>where PathBuf: Borrow<Q>,
pub fn remove_by_id(&self, id: ModId) -> Option<ModuleEntry>
pub fn get_similar_name(&self, name: &str) -> Option<Str>
pub fn initialize(&self)
pub fn rename_path(&self, path: &PathBuf, new: PathBuf)
pub fn ref_inner(&self) -> Ref<'_, Dict<PathBuf, ModuleEntry>>
Trait Implementations§
source§fn clone(&self) -> SharedModuleCache
fn clone(&self) -> SharedModuleCache
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§fn default() -> SharedModuleCache
fn default() -> SharedModuleCache
Returns the “default value” for a type. Read more