pub enum IntKind {
}
Expand description
Which integral type are we dealing with?
Variants§
Bool
A bool
.
SChar
A signed char
.
UChar
An unsigned char
.
WChar
An wchar_t
.
Char
A platform-dependent char
type, with the signedness support.
Short
A short
.
UShort
An unsigned short
.
Int
An int
.
UInt
An unsigned int
.
Long
A long
.
ULong
An unsigned long
.
LongLong
A long long
.
ULongLong
An unsigned long long
.
I8
A 8-bit signed integer.
U8
A 8-bit unsigned integer.
I16
A 16-bit signed integer.
U16
Either a char16_t
or a wchar_t
.
I32
A 32-bit signed integer.
U32
A 32-bit unsigned integer.
I64
A 64-bit signed integer.
U64
A 64-bit unsigned integer.
I128
An int128_t
U128
A uint128_t
.
Custom
Fields
A custom integer type, used to allow custom macro types depending on range.
Implementations§
source§impl IntKind
impl IntKind
sourcepub fn known_size(&self) -> Option<usize>
pub fn known_size(&self) -> Option<usize>
If this type has a known size, return it (in bytes). This is to alleviate libclang sometimes not giving us a layout (like in the case when an enum is defined inside a class with template parameters).
sourcepub fn signedness_matches(&self, val: i64) -> bool
pub fn signedness_matches(&self, val: i64) -> bool
Whether this type’s signedness matches the value.
Trait Implementations§
source§impl Ord for IntKind
impl Ord for IntKind
source§impl PartialOrd<IntKind> for IntKind
impl PartialOrd<IntKind> for IntKind
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more