Skip to main content

Module

Struct Module 

Source
pub struct Module {
Show 34 fields pub checked_in_new_solver: bool, pub name: ModuleName, pub human_readable_name: String, pub interface_types: TypeArena, pub internal_types: TypeArena, pub allocator: Option<Arc<Allocator>>, pub names: Option<Arc<AstNameTable>>, pub root: *mut AstStatBlock, pub scopes: Vec<(Location, ScopePtr)>, pub ast_types: DenseHashMap<*const AstExpr, TypeId>, pub ast_type_packs: DenseHashMap<*const AstExpr, TypePackId>, pub ast_expected_types: DenseHashMap<*const AstExpr, TypeId>, pub ast_original_call_types: DenseHashMap<*const AstNode, TypeId>, pub ast_overload_resolved_types: DenseHashMap<*const AstNode, TypeId>, pub ast_for_in_next_types: DenseHashMap<*const AstNode, TypeId>, pub ast_resolved_types: DenseHashMap<*const AstType, TypeId>, pub ast_resolved_type_packs: DenseHashMap<*const AstTypePack, TypePackId>, pub ast_compound_assign_result_types: DenseHashMap<*const AstStat, TypeId>, pub upper_bound_contributors: DenseHashMap<TypeId, Vec<(Location, TypeId)>>, pub ast_scopes: DenseHashMap<*const AstNode, *mut Scope>, pub type_function_aliases: Vec<Box<TypeFun>>, pub declared_globals: HashMap<Name, TypeId>, pub errors: ErrorVec, pub lint_result: LintResult, pub mode: Mode, pub type: Type, pub check_duration_sec: f64, pub timeout: bool, pub cancelled: bool, pub return_type: TypePackId, pub exported_type_bindings: HashMap<Name, TypeFun>, pub def_arena: DefArena, pub key_arena: RefinementKeyArena, pub constraint_generation_did_not_complete: bool,
}

Fields§

§checked_in_new_solver: bool§name: ModuleName§human_readable_name: String§interface_types: TypeArena§internal_types: TypeArena§allocator: Option<Arc<Allocator>>§names: Option<Arc<AstNameTable>>§root: *mut AstStatBlock§scopes: Vec<(Location, ScopePtr)>§ast_types: DenseHashMap<*const AstExpr, TypeId>§ast_type_packs: DenseHashMap<*const AstExpr, TypePackId>§ast_expected_types: DenseHashMap<*const AstExpr, TypeId>§ast_original_call_types: DenseHashMap<*const AstNode, TypeId>§ast_overload_resolved_types: DenseHashMap<*const AstNode, TypeId>§ast_for_in_next_types: DenseHashMap<*const AstNode, TypeId>§ast_resolved_types: DenseHashMap<*const AstType, TypeId>§ast_resolved_type_packs: DenseHashMap<*const AstTypePack, TypePackId>§ast_compound_assign_result_types: DenseHashMap<*const AstStat, TypeId>§upper_bound_contributors: DenseHashMap<TypeId, Vec<(Location, TypeId)>>§ast_scopes: DenseHashMap<*const AstNode, *mut Scope>§type_function_aliases: Vec<Box<TypeFun>>§declared_globals: HashMap<Name, TypeId>§errors: ErrorVec§lint_result: LintResult§mode: Mode§type: Type§check_duration_sec: f64§timeout: bool§cancelled: bool§return_type: TypePackId§exported_type_bindings: HashMap<Name, TypeFun>§def_arena: DefArena§key_arena: RefinementKeyArena§constraint_generation_did_not_complete: bool

Implementations§

Source§

impl Module

Source

pub fn clone_public_interface( &mut self, builtin_types: *mut BuiltinTypes, _ice: &mut InternalErrorReporter, mode: SolverMode, )

void Module::clonePublicInterface(NotNull<BuiltinTypes> builtinTypes, InternalErrorReporter& ice, SolverMode mode). Reference: Module.cpp:299-348.

Source§

impl Module

Source

pub fn get_module_scope(&self) -> ScopePtr

ScopePtr Module::getModuleScope() const. Reference: Module.cpp:355-359.

Source§

impl Module

Source

pub fn has_module_scope(&self) -> bool

Source§

impl Module

Source

pub fn module_destructor(&mut self)

Trait Implementations§

Source§

impl Debug for Module

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Module

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.