pub struct ArrayType {
    pub element_type: TypeIndex,
    pub indexing_type: TypeIndex,
    pub stride: Option<u32>,
    pub dimensions: Vec<u32>,
}
Expand description

The information parsed from a type record with kind LF_ARRAY, LF_ARRAY_ST or LF_STRIDED_ARRAY.

Fields

element_type: TypeIndexindexing_type: TypeIndexstride: Option<u32>dimensions: Vec<u32>

Contains array dimensions as specified in the PDB. This is not what you expect:

  • Dimensions are specified in terms of byte sizes, not element counts.
  • Multidimensional arrays aggregate the lower dimensions into the sizes of the higher dimensions.

Thus a float[4][4] has dimensions: [16, 64]. Determining array dimensions in terms of element counts requires determining the size of the element_type and iteratively dividing.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.