pub struct Field {Show 17 fields
pub name: Option<Identifier>,
pub notation: Option<Notation>,
pub basetype: Identifier,
pub is_const: bool,
pub is_struct: bool,
pub reference: Option<ReferenceType>,
pub optional: Option<CommaSeparatedBooleans>,
pub auto_validity: bool,
pub sync: Option<String>,
pub type_enums: Option<CommaSeparatedIdentifiers>,
pub array: Option<ArrayType>,
pub size: Option<ArraySize>,
pub size_enumref: Option<Identifier>,
pub c_size: Option<CExpression>,
pub null_terminate: bool,
pub successcodes: Option<CommaSeparatedIdentifiers>,
pub errorcodes: Option<CommaSeparatedIdentifiers>,
}Expand description
A typed field used in many different contexts.
Field can be used in the following ways:
- Struct member
- Union member
- Function parameter
- Function return type
Fields§
§name: Option<Identifier>name will always be present when used as a struct or union member.
name will most likely be present when used as a function parameter.
name will never be present when used as a function return type.
notation: Option<Notation>§basetype: IdentifierThe type of the field.
is_const: boolIf true, then the variable’s base type is constant. If the type is
a pointer or array, the const refers to the base type. So const T * rather
than T *const.
is_struct: boolIf true, then the basetype name needs to be preceeded by the C keyword
struct when interfacing with C.
reference: Option<ReferenceType>If present, then the variable is a pointer of some sort. This does not guarantee that variable is an array.
optional: Option<CommaSeparatedBooleans>Each boolean value represents a particular indirection, starting from the outermost
pointer. The true/false represents whether that indirection is optional.
For example, if an integer pointer type has optional set to false,true,
this means that the pointer is required, but the integer value may be zero.
auto_validity: boolIf set to false, then auto-validation for the variable should not be generated.
sync: Option<String>If present, will be either true or an expression that more explicitly
describes how it must externally sync.
If absent, then external synchronization is not necessary.
type_enums: Option<CommaSeparatedIdentifiers>Comma-separated list of enumerators that this member can be given.
array: Option<ArrayType>§size: Option<ArraySize>§size_enumref: Option<Identifier>The length of a static array variable, specified as an enumerator reference.
c_size: Option<CExpression>A C expression that specifies the number of elements in a static or dynamic array.
null_terminate: boolIf true, then a string variable (some form of pointer with the type char)
is null-terminated. If the type is a pointer-pointer or a pointer-const-pointer,
then the null-terminator refers only to the innermost string pointers.
successcodes: Option<CommaSeparatedIdentifiers>successcodes may contain a value only if Field is used as a function return type.
Specifies the return codes that represent successful function execution. When not
specified, then the command doesn’t return VkResult
errorcodes: Option<CommaSeparatedIdentifiers>errorcodes may contain a value only if Field is used as a function return type.
Specifies the return codes that represent error conditions. When not specified, either
the command doesn’t return VkResult or it cannot “fail”.