#[non_exhaustive]pub enum TypeKind {
Show 28 variants
NoType,
Boolean,
Byte,
Int8,
UInt8,
Int16,
UInt16,
Int32,
UInt32,
Int64,
UInt64,
Float32,
Float64,
Float128,
Char8,
Char16,
String8,
String16,
Enumeration,
Bitmask,
Alias,
Array,
Sequence,
Map,
Structure,
Union,
Bitset,
Annotation,
}Expand description
XTypes 1.3 TypeKind-Enum (§7.5.1 Table 10).
Covers the 24 kinds named in the spec. NoType corresponds to
TK_NONE.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NoType
No type — sentinel value.
Boolean
boolean.
Byte
octet / byte (8-bit unsigned).
Int8
int8.
UInt8
uint8.
Int16
int16.
UInt16
uint16.
Int32
int32.
UInt32
uint32.
Int64
int64.
UInt64
uint64.
Float32
float32.
Float64
float64.
Float128
float128 (long double).
Char8
char (8-bit).
Char16
wchar (16-bit).
String8
string<N>.
String16
wstring<N>.
Enumeration
Enumeration.
Bitmask
Bitmask.
Alias
Alias / typedef.
Array
Array T[D1,D2,...].
Sequence
sequence<T,N>.
Map
map<K,V,N>.
Structure
struct.
Union
union.
Bitset
bitset.
Annotation
annotation.
Implementations§
Source§impl TypeKind
impl TypeKind
Sourcepub const fn is_primitive(self) -> bool
pub const fn is_primitive(self) -> bool
true if the kind is a primitive, atomic type (not a
composite, not a collection). Spec §7.5.1.
Sourcepub const fn is_aggregable(self) -> bool
pub const fn is_aggregable(self) -> bool
true if this kind can carry members (Struct/Union/
Annotation/Bitset/Bitmask/Enum).
Trait Implementations§
impl Copy for TypeKind
impl Eq for TypeKind
impl StructuralPartialEq for TypeKind
Auto Trait Implementations§
impl Freeze for TypeKind
impl RefUnwindSafe for TypeKind
impl Send for TypeKind
impl Sync for TypeKind
impl Unpin for TypeKind
impl UnsafeUnpin for TypeKind
impl UnwindSafe for TypeKind
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