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<MappedRwLockReadGuard<'_, ModuleEntry>>where NormalizedPathBuf: Borrow<Q>,
pub fn get_mut<Q: Eq + Hash + ?Sized>( &self, path: &Q ) -> Option<MappedRwLockWriteGuard<'_, ModuleEntry>>where NormalizedPathBuf: Borrow<Q>,
pub fn get_ctx<Q: Eq + Hash + ?Sized>( &self, path: &Q ) -> Option<Arc<ModuleContext>>where NormalizedPathBuf: Borrow<Q>,
pub fn ref_ctx<Q: Eq + Hash + ?Sized>( &self, path: &Q ) -> Option<MappedRwLockReadGuard<'_, ModuleContext>>where NormalizedPathBuf: Borrow<Q>,
sourcepub fn raw_ref_ctx<Q: Eq + Hash + ?Sized>(
&self,
path: &Q
) -> Option<&ModuleContext>where
NormalizedPathBuf: Borrow<Q>,
pub fn raw_ref_ctx<Q: Eq + Hash + ?Sized>( &self, path: &Q ) -> Option<&ModuleContext>where NormalizedPathBuf: Borrow<Q>,
FIXME: see the comment in this function
pub fn register<P: Into<NormalizedPathBuf>>( &self, path: P, hir: Option<HIR>, ctx: ModuleContext )
pub fn remove<Q: Eq + Hash + ?Sized>(&self, path: &Q) -> Option<ModuleEntry>where NormalizedPathBuf: 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<P: Into<NormalizedPathBuf>>(&self, path: &Path, new: P)
pub fn ref_inner( &self ) -> MappedRwLockReadGuard<'_, Dict<NormalizedPathBuf, 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