Struct erg_compiler::module::global::SharedCompilerResource
source · pub struct SharedCompilerResource {
pub mod_cache: SharedModuleCache,
pub py_mod_cache: SharedModuleCache,
pub index: SharedModuleIndex,
pub graph: SharedModuleGraph,
pub trait_impls: SharedTraitImpls,
pub promises: SharedPromises,
pub errors: SharedCompileErrors,
pub warns: SharedCompileWarnings,
}
Fields§
§mod_cache: SharedModuleCache
§py_mod_cache: SharedModuleCache
§index: SharedModuleIndex
§graph: SharedModuleGraph
§trait_impls: SharedTraitImpls
K: name of a trait, V: (type, monomorphised trait that the type implements) K: トレイトの名前, V: (型, その型が実装する単相化トレイト) e.g. { “Named”: [(Type, Named), (Func, Named), …], “Add”: [(Nat, Add(Nat)), (Int, Add(Int)), …], … }
promises: SharedPromises
§errors: SharedCompileErrors
§warns: SharedCompileWarnings
Implementations§
sourcepub fn new(cfg: ErgConfig) -> Self
pub fn new(cfg: ErgConfig) -> Self
Initialize the shared compiler resource. This API is normally called only once throughout the compilation phase.
pub fn inherit(&self, path: PathBuf) -> Self
sourcepub fn clear(&self, path: &Path)
pub fn clear(&self, path: &Path)
Clear all information about the module. All child modules are also cleared.
pub fn rename_path(&self, old: &Path, new: PathBuf)
Trait Implementations§
source§fn clone(&self) -> SharedCompilerResource
fn clone(&self) -> SharedCompilerResource
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() -> SharedCompilerResource
fn default() -> SharedCompilerResource
Returns the “default value” for a type. Read more