Crate data_models[−][src]
Expand description
A data model is the choices of bit width of integer types by each platform.
This library is used to lookup the sizes of various C-types of a data model.
Examples
use data_models::*;
let model = DataModel::LP64; // e.g. Linux
let p = model.size_of::<Pointer>();
assert_eq!(p, 8);
Enums
Char represents the char
C type.
Smallest addressable unit of the machine.
It contains CHAR_BIT bits (typically 8).
A data model is the choices of bit width of integer types by each platform.
Int represents the int
C type.
It is required to be at least 16-bits.
Long represents the long
C type.
It is required to be at least 32-bits.
LongLong represents the long long
C type.
It is required to be at least 64-bits.
Pointer represents the size_t
C type.
It is required to be at least 16-bits.
Short represents the short
C type.
It is required to be at least 16-bits.