pub struct TypeInstantiator<'a> {
pub this_type: Option<TypeId>,
/* private fields */
}Expand description
Instantiator for applying type substitutions.
Fields§
§this_type: Option<TypeId>When set, substitutes ThisType with this concrete type.
Implementations§
Source§impl<'a> TypeInstantiator<'a>
impl<'a> TypeInstantiator<'a>
Sourcepub fn new(
interner: &'a dyn TypeDatabase,
substitution: &'a TypeSubstitution,
) -> Self
pub fn new( interner: &'a dyn TypeDatabase, substitution: &'a TypeSubstitution, ) -> Self
Create a new instantiator.
Sourcepub fn instantiate(&mut self, type_id: TypeId) -> TypeId
pub fn instantiate(&mut self, type_id: TypeId) -> TypeId
Apply the substitution to a type, returning the instantiated type.
Auto Trait Implementations§
impl<'a> Freeze for TypeInstantiator<'a>
impl<'a> !RefUnwindSafe for TypeInstantiator<'a>
impl<'a> !Send for TypeInstantiator<'a>
impl<'a> !Sync for TypeInstantiator<'a>
impl<'a> Unpin for TypeInstantiator<'a>
impl<'a> UnsafeUnpin for TypeInstantiator<'a>
impl<'a> !UnwindSafe for TypeInstantiator<'a>
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