pub struct Types { /* private fields */ }Implementations§
Source§impl Types
impl Types
pub fn analyze(&mut self, resolve: &Resolve)
Sourcepub fn collect_equal_types(
&mut self,
resolve: &Resolve,
may_alias_another_type: &dyn Fn(TypeId) -> bool,
)
pub fn collect_equal_types( &mut self, resolve: &Resolve, may_alias_another_type: &dyn Fn(TypeId) -> bool, )
Populates the return value of Types::get_representative_type with
the resolve passed in.
The may_alias_another_type closure is used to determine whether the
language’s definition of the provided TypeId might possibly alias
some other type in a language. This is a language-specific deduction
which can also be affected by options to a binding generator. If a type
can’t be aliased by anything else then it can’t be considered equal to
anything else. Note that in this situations other types may still
be equal to it, such as aliased types at the WIT level (e.g. type foo = some-record).
pub fn get(&self, id: TypeId) -> TypeInfo
pub fn type_id_info(&mut self, resolve: &Resolve, ty: TypeId) -> TypeInfo
pub fn type_info(&mut self, resolve: &Resolve, ty: &Type) -> TypeInfo
pub fn get_representative_type(&mut self, id: TypeId) -> TypeId
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Types
impl RefUnwindSafe for Types
impl Send for Types
impl Sync for Types
impl Unpin for Types
impl UnwindSafe for Types
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