pub struct TyProgram {
pub kind: TyProgramKind,
pub root: TyModule,
pub storage_slots: Vec<StorageSlot>,
pub logged_types: Vec<TypeId>,
}
Fields
kind: TyProgramKind
root: TyModule
storage_slots: Vec<StorageSlot>
logged_types: Vec<TypeId>
Implementations
sourceimpl TyProgram
impl TyProgram
sourcepub fn type_check(
parsed: &ParseProgram,
initial_namespace: Module
) -> CompileResult<Self>
pub fn type_check(
parsed: &ParseProgram,
initial_namespace: Module
) -> CompileResult<Self>
Type-check the given parsed program to produce a typed program.
The given initial_namespace
acts as an initial state for each module within this program.
It should contain a submodule for each library package dependency.
sourcepub fn validate_root(
root: &TyModule,
kind: TreeType,
module_span: Span
) -> CompileResult<TyProgramKind>
pub fn validate_root(
root: &TyModule,
kind: TreeType,
module_span: Span
) -> CompileResult<TyProgramKind>
Validate the root module given the expected program kind.
pub fn generate_json_abi_program(
&self,
types: &mut Vec<JsonTypeDeclaration>
) -> JsonABIProgram
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TyProgram
impl Send for TyProgram
impl Sync for TyProgram
impl Unpin for TyProgram
impl UnwindSafe for TyProgram
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