enum LookupType {
    Handle(Handle<Type>),
    Local(LocalType),
}Expand description
A type encountered during SPIR-V generation.
In the process of writing SPIR-V, we need to synthesize various types for intermediate results and such: pointer types, vector/matrix component types, or even booleans, which usually appear in SPIR-V code even when they’re not used by the module source.
However, we can’t use crate::Type or crate::TypeInner for these, as the
type arena may not contain what we need (it only contains types used
directly by other parts of the IR), and the IR module is immutable, so we
can’t add anything to it.
So for local use in the SPIR-V writer, we use this type, which holds either
a handle into the arena, or a LocalType containing something synthesized
locally.
This is very similar to the proc::TypeResolution enum, with LocalType
playing the role of TypeInner. However, LocalType also has other
properties needed for SPIR-V generation; see the description of
LocalType for details.
Variants§
Trait Implementations§
Source§impl Clone for LookupType
 
impl Clone for LookupType
Source§fn clone(&self) -> LookupType
 
fn clone(&self) -> LookupType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LookupType
 
impl Debug for LookupType
Source§impl From<LocalType> for LookupType
 
impl From<LocalType> for LookupType
Source§impl Hash for LookupType
 
impl Hash for LookupType
Source§impl PartialEq for LookupType
 
impl PartialEq for LookupType
impl Copy for LookupType
impl Eq for LookupType
impl StructuralPartialEq for LookupType
Auto Trait Implementations§
impl Freeze for LookupType
impl RefUnwindSafe for LookupType
impl Send for LookupType
impl Sync for LookupType
impl Unpin for LookupType
impl UnwindSafe for LookupType
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
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.