Skip to main content

Unifier2

Struct Unifier2 

Source
pub struct Unifier2 { /* private fields */ }

Implementations§

Source§

impl Unifier2

Source

pub fn fresh_type( &mut self, scope: NonNull<Scope>, polarity: Polarity, ) -> TypeId

Source§

impl Unifier2

Source

pub fn fresh_type_pack( &mut self, scope: NonNull<Scope>, polarity: Polarity, ) -> TypePackId

Source§

impl Unifier2

Source§

impl Unifier2

Source

pub fn mk_intersection(&mut self, left: TypeId, right: TypeId) -> TypeId

Source§

impl Unifier2

Source

pub fn mk_union(&mut self, left: TypeId, right: TypeId) -> TypeId

Source§

impl Unifier2

Source

pub fn occurs_check( &mut self, seen: &mut DenseHashSet<TypeId>, needle: TypeId, haystack: TypeId, ) -> OccursCheckResult

Source§

impl Unifier2

Source

pub fn occurs_check_deprecated( &mut self, seen: &mut DenseHashSet<TypePackId>, needle: TypePackId, haystack: TypePackId, ) -> OccursCheckResult

Source§

impl Unifier2

Source§

impl Unifier2

Source§

impl Unifier2

Source

pub fn unify_free_with_type( &mut self, sub_ty: TypeId, super_ty: TypeId, ) -> UnifyResult

Source§

impl Unifier2

Source

pub fn unify(&mut self, sub_ty: TypeId, super_ty: TypeId) -> UnifyResult

Source§

impl Unifier2

Source

pub fn unify_pack( &mut self, sub_tp: TypePackId, super_tp: TypePackId, ) -> UnifyResult

Source§

impl Unifier2

Source

pub fn unify_type_id_type_id( &mut self, sub_ty: TypeId, super_ty: TypeId, ) -> UnifyResult

Source§

impl Unifier2

Source

pub fn unify_type_id_function_type( &mut self, sub_ty: TypeId, super_fn: &FunctionType, ) -> UnifyResult

Source§

impl Unifier2

Source

pub fn unify_union_type_type_id( &mut self, sub_union: &UnionType, super_ty: TypeId, ) -> UnifyResult

Source§

impl Unifier2

Source

pub fn unify_type_id_union_type( &mut self, sub_ty: TypeId, super_union: &UnionType, ) -> UnifyResult

Source§

impl Unifier2

Source

pub fn unify_intersection_type_type_id( &mut self, sub_intersection: &IntersectionType, super_ty: TypeId, ) -> UnifyResult

Source§

impl Unifier2

Source

pub fn unify_type_id_intersection_type( &mut self, sub_ty: TypeId, super_intersection: &IntersectionType, ) -> UnifyResult

Source§

impl Unifier2

Source

pub fn unify_table_type_table_type( &mut self, sub_table: &mut TableType, super_table: &TableType, ) -> UnifyResult

Source§

impl Unifier2

Source

pub fn unify_metatable_type_metatable_type( &mut self, sub_metatable: &MetatableType, super_metatable: &MetatableType, ) -> UnifyResult

Source§

impl Unifier2

Source

pub fn unify_any_type_function_type( &mut self, _sub_any: &AnyType, super_fn: &FunctionType, ) -> UnifyResult

Source§

impl Unifier2

Source

pub fn unify_function_type_any_type( &mut self, sub_fn: &FunctionType, _super_any: &AnyType, ) -> UnifyResult

Source§

impl Unifier2

Source

pub fn unify_any_type_table_type( &mut self, _sub_any: &AnyType, super_table: &TableType, ) -> UnifyResult

Source§

impl Unifier2

Source

pub fn unify_table_type_any_type( &mut self, sub_table: &TableType, _super_any: &AnyType, ) -> UnifyResult

Source§

impl Unifier2

Source

pub fn unify_metatable_type_any_type( &mut self, sub_metatable: &MetatableType, _super_any: &AnyType, ) -> UnifyResult

Source§

impl Unifier2

Source

pub fn unify_any_type_metatable_type( &mut self, _sub_any: &AnyType, super_metatable: &MetatableType, ) -> UnifyResult

Source§

impl Unifier2

Source

pub fn unify_type_pack_id_type_pack_id( &mut self, sub_tp: TypePackId, super_tp: TypePackId, ) -> UnifyResult

Trait Implementations§

Source§

impl Debug for Unifier2

Source§

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

Formats the value using the given formatter. 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.