#[non_exhaustive]
pub enum VariableType {
    Structure {
        name: String,
        type_params: Vec<TemplateTypeParam>,
        members: Vec<StructureMember>,
        byte_size: u64,
    },
    Union {
        name: String,
        type_params: Vec<TemplateTypeParam>,
        members: Vec<StructureMember>,
        byte_size: u64,
    },
    Class {
        name: String,
        type_params: Vec<TemplateTypeParam>,
        members: Vec<StructureMember>,
        byte_size: u64,
    },
    BaseType {
        name: String,
        encoding: DwAte,
        byte_size: u64,
    },
    PointerType {
        name: String,
        pointee_type: Box<VariableType>,
    },
    ArrayType {
        array_type: Box<VariableType>,
        lower_bound: i64,
        count: u64,
        byte_size: Option<u64>,
    },
    EnumerationType {
        name: String,
        underlying_type: Box<VariableType>,
        enumerators: Vec<Enumerator>,
    },
    Subroutine,
}
Expand description

The precise type of a variable according to the debug info

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

Structure

Fields

name: String

The name of the struct type

type_params: Vec<TemplateTypeParam>

A collection of possible type parameters

members: Vec<StructureMember>

The members (fields) of the struct

byte_size: u64

The in-memory size of the struct in bytes

The variable is a struct type

Union

Fields

name: String

The name of the union type

type_params: Vec<TemplateTypeParam>

A collection of possible type parameters

members: Vec<StructureMember>

The members (fields) of the union

byte_size: u64

The in-memory size of the union in bytes

The variable is a union type

Class

Fields

name: String

The name of the union type

type_params: Vec<TemplateTypeParam>

A collection of possible type parameters

members: Vec<StructureMember>

The members (fields) of the union

byte_size: u64

The in-memory size of the union in bytes

The variable is a class type

BaseType

Fields

name: String

The name of the base type

encoding: DwAte

The kind of base type this is, encoded as in the DWARF debug format

byte_size: u64

The in-memory size of the base type in bytes

The variable is a primitive type (e.g. integer, float, etc)

PointerType

Fields

name: String

The type name of the pointer

pointee_type: Box<VariableType>

The type of the thing this pointer points at

The variable is a pointer

ArrayType

Fields

array_type: Box<VariableType>

The type of the elements in the array

lower_bound: i64

The lower bound index

count: u64

The amount of elements in the array

byte_size: Option<u64>

The optionally given size in bytes

The variable is an array

EnumerationType

Fields

name: String

The type name of the enum

underlying_type: Box<VariableType>

The type that is used to represent the enum in memory (typically an integer)

enumerators: Vec<Enumerator>

The variants of the enum

The variable is an enum (c-style)

Subroutine

The variable is a subroutine (method)

Implementations

Get the name of the type

Get the size in bytes that this type takes up in memory

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

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

Converts self into T using Into<T>. Read more

Causes self to use its Binary implementation when Debug-formatted. Read more

Causes self to use its Display implementation when Debug-formatted. Read more

Causes self to use its LowerExp implementation when Debug-formatted. Read more

Causes self to use its LowerHex implementation when Debug-formatted. Read more

Causes self to use its Octal implementation when Debug-formatted. Read more

Causes self to use its Pointer implementation when Debug-formatted. Read more

Causes self to use its UpperExp implementation when Debug-formatted. Read more

Causes self to use its UpperHex implementation when Debug-formatted. Read more

Formats each item in a sequence. 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.

Pipes by value. This is generally the method you want to use. Read more

Borrows self and passes that borrow into the pipe function. Read more

Mutably borrows self and passes that borrow into the pipe function. Read more

Borrows self, then passes self.borrow() into the pipe function. Read more

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more

Borrows self, then passes self.as_ref() into the pipe function.

Mutably borrows self, then passes self.as_mut() into the pipe function. Read more

Borrows self, then passes self.deref() into the pipe function.

Mutably borrows self, then passes self.deref_mut() into the pipe function. Read more

Immutable access to a value. Read more

Mutable access to a value. Read more

Immutable access to the Borrow<B> of a value. Read more

Mutable access to the BorrowMut<B> of a value. Read more

Immutable access to the AsRef<R> view of a value. Read more

Mutable access to the AsMut<R> view of a value. Read more

Immutable access to the Deref::Target of a value. Read more

Mutable access to the Deref::Target of a value. Read more

Calls .tap() only in debug builds, and is erased in release builds.

Calls .tap_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref_mut() only in debug builds, and is erased in release builds. Read more

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

Attempts to convert self into T using TryInto<T>. 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.