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
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 for IntKind
impl PartialOrd for IntKind
impl Copy for IntKind
impl Eq for IntKind
impl StructuralPartialEq for IntKind
Auto Trait Implementations§
impl Freeze for IntKind
impl RefUnwindSafe for IntKind
impl Send for IntKind
impl Sync for IntKind
impl Unpin for IntKind
impl UnwindSafe for IntKind
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more