Struct erg_compiler::mod_cache::ModuleCache
source · [−]pub struct ModuleCache { /* private fields */ }
Implementations
sourceimpl ModuleCache
impl ModuleCache
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>(
&mut self,
name: &Q
) -> Option<&mut ModuleEntry>where
VarName: Borrow<Q>,
pub fn register(&mut self, name: VarName, hir: Option<HIR>, ctx: Context)
pub fn remove<Q: Eq + Hash + ?Sized>(&mut self, name: &Q) -> Option<ModuleEntry>where
VarName: Borrow<Q>,
pub fn remove_by_id(&mut self, id: ModId) -> Option<ModuleEntry>
Trait Implementations
sourceimpl Debug for ModuleCache
impl Debug for ModuleCache
sourceimpl Default for ModuleCache
impl Default for ModuleCache
sourcefn default() -> ModuleCache
fn default() -> ModuleCache
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for ModuleCache
impl !Send for ModuleCache
impl !Sync for ModuleCache
impl Unpin for ModuleCache
impl !UnwindSafe for ModuleCache
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more