pub struct TypeSystem { /* private fields */ }Implementations§
Source§impl TypeSystem
impl TypeSystem
pub fn new() -> Self
pub fn std(&self) -> StandardTypes
pub fn alloc(&mut self, ty: Type) -> TypeId
pub fn get_raw(&self, type_id: TypeId) -> &Type
pub fn get_raw_mut(&mut self, type_id: TypeId) -> &mut Type
pub fn get_recursive(&self, type_id: TypeId) -> &Type
pub fn get_unaliased(&self, type_id: TypeId) -> &Type
pub fn get(&self, type_id: TypeId) -> &Type
pub fn get_mut(&mut self, type_id: TypeId) -> &mut Type
pub fn get_pair(&self, type_id: TypeId) -> Option<(TypeId, TypeId)>
pub fn get_union(&self, type_id: TypeId) -> Option<&[TypeId]>
pub fn get_callable(&self, type_id: TypeId) -> Option<&Callable>
pub fn get_callable_recursive(&mut self, type_id: TypeId) -> Option<&Callable>
pub fn stringify_named( &self, type_id: TypeId, names: HashMap<TypeId, String>, ) -> String
pub fn stringify(&self, type_id: TypeId) -> String
pub fn debug(&self, type_id: TypeId) -> String
pub fn compare(&self, lhs: TypeId, rhs: TypeId) -> Comparison
pub fn compare_with_generics( &self, lhs: TypeId, rhs: TypeId, substitution_stack: &mut Vec<HashMap<TypeId, TypeId>>, infer_generics: bool, ) -> Comparison
pub fn substitute( &mut self, type_id: TypeId, substitutions: HashMap<TypeId, TypeId>, ) -> TypeId
pub fn check(&mut self, lhs: TypeId, rhs: TypeId) -> Result<Check, CheckError>
pub fn difference(&mut self, lhs: TypeId, rhs: TypeId) -> TypeId
pub fn replace( &mut self, type_id: TypeId, replace_type_id: TypeId, path: &[TypePath], ) -> TypeId
Trait Implementations§
Source§impl Clone for TypeSystem
impl Clone for TypeSystem
Source§fn clone(&self) -> TypeSystem
fn clone(&self) -> TypeSystem
Returns a duplicate 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§impl Debug for TypeSystem
impl Debug for TypeSystem
Auto Trait Implementations§
impl Freeze for TypeSystem
impl RefUnwindSafe for TypeSystem
impl Send for TypeSystem
impl Sync for TypeSystem
impl Unpin for TypeSystem
impl UnwindSafe for TypeSystem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more