Struct vkxml::Field [] [src]

pub struct Field {
    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>,
}

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 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.

The type of the field.

If 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.

If true, then the basetype name needs to be preceeded by the C keyword struct when interfacing with C.

If present, then the variable is a pointer of some sort. This does not guarantee that variable is an array.

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.

If set to false, then auto-validation for the variable should not be generated.

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.

Comma-separated list of enumerators that this member can be given.

The length of a static array variable, specified as an enumerator reference.

A C expression that specifies the number of elements in a static or dynamic array.

If 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 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 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".

Trait Implementations

impl Debug for Field
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Field

impl Sync for Field