Struct erg_compiler::mod_cache::SharedModuleCache
source · [−]pub struct SharedModuleCache(_);
Implementations
pub fn new() -> Self
pub fn get<Q: Eq + Hash + ?Sized>(&self, name: &Q) -> Option<&ModuleEntry>where
VarName: Borrow<Q>,
pub fn get_mut<Q: Eq + Hash + ?Sized>(
&self,
name: &Q
) -> Option<&mut ModuleEntry>where
VarName: Borrow<Q>,
pub fn get_ctx<Q: Eq + Hash + ?Sized>(&self, name: &Q) -> Option<Rc<Context>>where
VarName: Borrow<Q>,
pub fn ref_ctx<Q: Eq + Hash + ?Sized>(&self, name: &Q) -> Option<&Context>where
VarName: Borrow<Q>,
pub fn register(&self, name: VarName, hir: Option<HIR>, ctx: Context)
pub fn remove<Q: Eq + Hash + ?Sized>(&self, name: &Q) -> Option<ModuleEntry>where
VarName: Borrow<Q>,
pub fn remove_by_id(&self, id: ModId) -> Option<ModuleEntry>
Trait Implementations
sourcefn clone(&self) -> SharedModuleCache
fn clone(&self) -> SharedModuleCache
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourcefn default() -> SharedModuleCache
fn default() -> SharedModuleCache
Returns the “default value” for a type. Read more
Auto Trait Implementations
Blanket Implementations
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more