pub trait Buildable<T = HIR> {
// Required methods
fn inherit(cfg: ErgConfig, shared: SharedCompilerResource) -> Self
where Self: Sized;
fn inherit_with_name(
cfg: ErgConfig,
mod_name: Str,
shared: SharedCompilerResource
) -> Self
where Self: Sized;
fn build(
&mut self,
src: String,
mode: &str
) -> Result<CompleteArtifact<T>, IncompleteArtifact<T>>;
fn build_from_ast(
&mut self,
ast: AST,
mode: &str
) -> Result<CompleteArtifact<T>, IncompleteArtifact<T>>;
fn pop_context(&mut self) -> Option<ModuleContext>;
fn get_context(&self) -> Option<&ModuleContext>;
}