#[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
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§
Source§impl CDataModel
impl CDataModel
Sourcepub fn pointer_width(self) -> Size
pub fn pointer_width(self) -> Size
The width of a pointer (in the default address space).
Sourcepub fn short_size(self) -> Size
pub fn short_size(self) -> Size
The size of a C short. This is required to be at least 16 bits.
Sourcepub fn long_long_size(self) -> Size
pub fn long_long_size(self) -> Size
The size of a C long long. This is required (in C99+) to be at least 64 bits.
Sourcepub fn float_size(self) -> Size
pub fn float_size(self) -> Size
The size of a C float.
Sourcepub fn double_size(self) -> Size
pub fn double_size(self) -> Size
The size of a C double.
Trait Implementations§
Source§impl Clone for CDataModel
impl Clone for CDataModel
Source§fn clone(&self) -> CDataModel
fn clone(&self) -> CDataModel
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more