#[non_exhaustive]
pub enum CDataModel {
    LP32,
    ILP32,
    LLP64,
    LP64,
    ILP64,
}
Expand description

The C data model used on a target.

See also https://en.cppreference.com/w/c/language/arithmetic_types

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.

LP32

The data model used most commonly on Win16. long and pointer are 32 bits.

ILP32

The data model used most commonly on Win32 and 32-bit Unix systems.

int, long, and pointer are all 32 bits.

LLP64

The data model used most commonly on Win64

long long, and pointer are 64 bits.

LP64

The data model used most commonly on 64-bit Unix systems

long, and pointer are 64 bits.

ILP64

A rare data model used on early 64-bit Unix systems

int, long, and pointer are all 64 bits.

Implementations

The width of a pointer (in the default address space).

The size of a C short. This is required to be at least 16 bits.

The size of a C int. This is required to be at least 16 bits.

The size of a C long. This is required to be at least 32 bits.

The size of a C long long. This is required (in C99+) to be at least 64 bits.

The size of a C float.

The size of a C double.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.