pub struct Instantiation<'a> {
pub item: ItemId,
pub args: &'a [TypeId],
pub dispatch: Dispatch,
}Expand description
The generic item an expression uses and its arguments: a path to a generic function, a method call, a constructor of a generic type.
§Examples
use typeck_lang::{Dispatch, Instantiation};
fn is_virtual(i: Instantiation<'_>) -> bool {
i.dispatch == Dispatch::Dynamic
}Fields§
§item: ItemIdThe item used.
args: &'a [TypeId]Its placeholders’ arguments (they may mention the placeholders of the item the expression is in).
dispatch: DispatchHow the call is dispatched.
Trait Implementations§
Source§impl<'a> Clone for Instantiation<'a>
impl<'a> Clone for Instantiation<'a>
impl<'a> Copy for Instantiation<'a>
Source§impl<'a> Debug for Instantiation<'a>
impl<'a> Debug for Instantiation<'a>
impl<'a> Eq for Instantiation<'a>
Source§impl<'a> PartialEq for Instantiation<'a>
impl<'a> PartialEq for Instantiation<'a>
impl<'a> StructuralPartialEq for Instantiation<'a>
Auto Trait Implementations§
impl<'a> Freeze for Instantiation<'a>
impl<'a> RefUnwindSafe for Instantiation<'a>
impl<'a> Send for Instantiation<'a>
impl<'a> Sync for Instantiation<'a>
impl<'a> Unpin for Instantiation<'a>
impl<'a> UnsafeUnpin for Instantiation<'a>
impl<'a> UnwindSafe for Instantiation<'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