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
sourceimpl 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
sourceimpl Clone for CDataModel
impl Clone for CDataModel
sourcefn clone(&self) -> CDataModel
fn clone(&self) -> CDataModel
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CDataModel
impl Debug for CDataModel
sourceimpl Hash for CDataModel
impl Hash for CDataModel
sourceimpl PartialEq<CDataModel> for CDataModel
impl PartialEq<CDataModel> for CDataModel
impl Copy for CDataModel
impl Eq for CDataModel
impl StructuralEq for CDataModel
impl StructuralPartialEq for CDataModel
Auto Trait Implementations
impl RefUnwindSafe for CDataModel
impl Send for CDataModel
impl Sync for CDataModel
impl Unpin for CDataModel
impl UnwindSafe for CDataModel
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more