pub enum Datatype {
Show 27 variants
Unknown,
AnyScope,
CFixedPoint,
CString,
CUTF8String,
CVector2f,
CVector2i,
CVector3f,
CVector3i,
CVector4f,
CVector4i,
Date,
Scope,
TopScope,
bool,
double,
float,
int16,
int32,
int64,
int8,
uint16,
uint32,
uint64,
uint8,
void,
Ck3(Ck3Datatype),
}Expand description
All the object types used in [...] code in localization and gui files.
The names exactly match the ones in the data_types logs from the games,
which is why some of them are lowercase.
Most of the variants are generated directly from those logs.
The enum is divided into the “generic” datatypes, which are valid for all games and which can be referenced directly in code, and the per-game lists of datatypes which are in game-specific wrappers. With a few exceptions, the per-game datatypes are only referenced in the per-game tables of datafunctions and promotes.
The game-specific datatypes are wrapped because otherwise they would still have name collisions. This is because the list of generic datatypes is only a small selection; there are many more datatypes that are in effect generic but separating them out would be pointless work. (Separating them out would be made harder because the lists of variants are generated from the docs).
Variants§
Unknown
AnyScope
CFixedPoint
CString
CUTF8String
CVector2f
CVector2i
CVector3f
CVector3i
CVector4f
CVector4i
Date
Scope
TopScope
bool
double
float
int16
int32
int64
int8
uint16
uint32
uint64
uint8
void
Ck3(Ck3Datatype)
Trait Implementations§
Source§impl FromStr for Datatype
impl FromStr for Datatype
Source§fn from_str(s: &str) -> Result<Self, ParseError>
fn from_str(s: &str) -> Result<Self, ParseError>
Read a Datatype from a string, without requiring the string to use the game-specific wrappers.