Basic types
Alias types
-
Unsigned 8-bit integer (0~255).
-
Unsigned 16-bit integer (0~65535).
-
Unsigned 32-bit integer (0~4294967295).
-
Unsigned 64-bit integer (0~18446744073709551615).
-
Signed 8-bit integer (-128~127).
-
Signed 16-bit integer (-32768~32767).
-
Signed 32-bit integer (-2147482648~2147483647).
-
Signed 64-bit integer (-9223372036854775808~9223372036854775807).
-
32-bit (single precision) floating point number.
-
64-bit (double precision) floating point number.
-
An alias of
u8
that represents one byte. You may use this type to differentiate the concept of byte stream (byte_t) from number array (u8). -
using nullptr_t = std::nullptr_t
usize
is the unsigned integer type of whose length marches the machine architecture. In particular, in 32-bit application, this is 32-bit unsigned integer; in 64-bit application, this is 64-bit unsigned integer. Theusize
type is guaranteed to be large enough to store a indexable memory address, so that any pointer can be reinterpreted casted tousize
. -
opaque_t
is used to represent one opaque pointer that shall not be reinterpreted or dereferred by the user. opaque_t are ususally used as arguments or returns values of interface functions to hide the implementation from the user. -
8-bit character. Signed/unsigned is unspecified, cast this to u8/i8 for fetching number.
-
16-bit character. Signed/unsigned is unspecified, cast this to u16/i16 for fetching number.
-
32-bit character. Signed/unsigned is unspecified, cast this to u32/i32 for fetching number.
Constants
-
The maximum number that can be represented by one i8 value.
-
The minimum number that can be represented by one i8 value.
-
The maximum number that can be represented by one i16 value.
-
The minimum number that can be represented by one i16 value.
-
The maximum number that can be represented by one i32 value.
-
The minimum number that can be represented by one i32 value.
-
The maximum number that can be represented by one i64 value.
-
The minimum number that can be represented by one i64 value.
-
The maximum number that can be represented by one u8 value.
-
The maximum number that can be represented by one u16 value.
-
The maximum number that can be represented by one u32 value.
-
The maximum number that can be represented by one u64 value.
-
The maximum number that can be represented by one usize value.
-
The maximum number that can be represented by one isize value.
-
The minimum number that can be represented by one isize value.
-
The maximum alignment requirement for a standard-layout scalar value.