pub struct TypeDef { /* private fields */ }Expand description
Type definition entry (4 bytes).
Semantics of data and count depend on kind:
- Wrappers (Optional, ArrayStar, ArrayPlus):
data= inner TypeId,count= 0 - Struct/Enum:
data= member index,count= member count - Alias:
data= target TypeId,count= 0
Implementations§
Source§impl TypeDef
impl TypeDef
Sourcepub fn placeholder() -> Self
pub fn placeholder() -> Self
Create a placeholder slot (to be filled later).
Sourcepub fn wrapper(kind: TypeKind, inner: TypeId) -> Self
pub fn wrapper(kind: TypeKind, inner: TypeId) -> Self
Create a wrapper type (Optional, ArrayStar, ArrayPlus).
Sourcepub fn composite(kind: TypeKind, member_start: u16, member_count: u8) -> Self
pub fn composite(kind: TypeKind, member_start: u16, member_count: u8) -> Self
Create a composite type (Struct, Enum).
Sourcepub fn array_star(element: TypeId) -> Self
pub fn array_star(element: TypeId) -> Self
Create an ArrayStar (T*) wrapper type.
Sourcepub fn array_plus(element: TypeId) -> Self
pub fn array_plus(element: TypeId) -> Self
Create an ArrayPlus (T+) wrapper type.
Sourcepub fn struct_type(member_start: u16, member_count: u8) -> Self
pub fn struct_type(member_start: u16, member_count: u8) -> Self
Create a struct type.
Trait Implementations§
impl Copy for TypeDef
impl Eq for TypeDef
impl StructuralPartialEq for TypeDef
Auto Trait Implementations§
impl Freeze for TypeDef
impl RefUnwindSafe for TypeDef
impl Send for TypeDef
impl Sync for TypeDef
impl Unpin for TypeDef
impl UnwindSafe for TypeDef
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key and return true if they are equal.