pub enum TypeData {
Struct(StructData),
Enum(EnumData),
Array {
element: InternedType,
len: u64,
},
PtrConst {
pointee: InternedType,
},
PtrMut {
pointee: InternedType,
},
}Expand description
Type data stored in the intern pool.
This is NOT Copy - it lives in the pool. You work with InternedType indices.
§Type Categories
- Struct and Enum are nominal types: identity comes from the name
- Array, PtrConst, and PtrMut are structural types: identity comes from element/pointee type
Variants§
Struct(StructData)
User-defined struct (nominal type).
Two structs with the same fields but different names are different types.
Enum(EnumData)
User-defined enum (nominal type).
Two enums with the same variants but different names are different types.
Array
Fixed-size array (structural type).
Arrays with the same element type and length are the same type, regardless of where they were defined.
PtrConst
Raw const pointer (structural type).
ptr const T - pointer to immutable data.
Fields
§
pointee: InternedTypePtrMut
Raw mut pointer (structural type).
ptr mut T - pointer to mutable data.
Fields
§
pointee: InternedTypeTrait Implementations§
Auto Trait Implementations§
impl Freeze for TypeData
impl RefUnwindSafe for TypeData
impl Send for TypeData
impl Sync for TypeData
impl Unpin for TypeData
impl UnwindSafe for TypeData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
§type Iter<'a> = Once<&'a T>
where
T: 'a
type Iter<'a> = Once<&'a T> where T: 'a
An iterator over the items within this container, by reference.
§fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
Check whether an item is contained within this sequence.
§fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
Convert an item of the sequence into a [
MaybeRef].