Enum target_lexicon::CDataModel
source · #[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 moresource§impl Debug for CDataModel
impl Debug for CDataModel
source§impl Hash for CDataModel
impl Hash for CDataModel
source§impl PartialEq for CDataModel
impl PartialEq for CDataModel
impl Copy for CDataModel
impl Eq for CDataModel
impl StructuralPartialEq for CDataModel
Auto Trait Implementations§
impl Freeze for CDataModel
impl RefUnwindSafe for CDataModel
impl Send for CDataModel
impl Sync for CDataModel
impl Unpin for CDataModel
impl UnwindSafe for CDataModel
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)