[][src]Enum bindgen::callbacks::IntKind

pub enum IntKind {
    Bool,
    SChar,
    UChar,
    WChar {
        size: usize,
    },
    Char {
        is_signed: bool,
    },
    Short,
    UShort,
    Int,
    UInt,
    Long,
    ULong,
    LongLong,
    ULongLong,
    I8,
    U8,
    I16,
    U16,
    I32,
    U32,
    I64,
    U64,
    I128,
    U128,
    Custom {
        name: &'static str,
        is_signed: bool,
    },
}

Which integral type are we dealing with?

Variants

Bool

A bool.

SChar

A signed char.

UChar

An unsigned char.

WChar

An wchar_t.

Fields of WChar

size: usize

The size of the wchar_t in bytes, which will be 2 or 4.

Char

A platform-dependent char type, with the signedness support.

Fields of Char

is_signed: bool

Whether the char is signed for the target platform.

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.

Fields of Custom

name: &'static str

The name of the type, which would be used without modification.

is_signed: bool

Whether the type is signed or not.

Methods

impl IntKind[src]

pub fn is_signed(&self) -> bool[src]

Is this integral type signed?

pub fn known_size(&self) -> Option<usize>[src]

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).

pub fn signedness_matches(&self, val: i64) -> bool[src]

Whether this type's signedness matches the value.

Trait Implementations

impl PartialEq<IntKind> for IntKind[src]

impl Clone for IntKind[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Ord for IntKind[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl Eq for IntKind[src]

impl Copy for IntKind[src]

impl PartialOrd<IntKind> for IntKind[src]

impl Debug for IntKind[src]

impl Hash for IntKind[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for IntKind

impl Sync for IntKind

Blanket Implementations

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]