Struct clang::Type

source · []
pub struct Type<'tu> { /* private fields */ }
Expand description

The type of an AST entity.

Implementations

Returns the kind of this type.

Returns the display name of this type.

Returns the alignment of this type in bytes.

Failures
  • this type is a dependent type
  • this type is an incomplete type

Returns the offset of the field with the supplied name in this record type in bits.

Failures
  • this record type is a dependent type
  • this record record type is an incomplete type
  • this record type does not contain a field with the supplied name

Returns the size of this type in bytes.

Failures
  • this type is a dependent type
  • this type is an incomplete type
  • this type is a variable size type

Returns the address space of this type.

Returns the argument types for this function or method type, if applicable.

Returns the calling convention specified for this function type, if applicable.

Returns the canonical type for this type.

The canonical type is the underlying type with all “sugar” removed (e.g., typedefs).

Returns the class type for this member pointer type, if applicable.

Returns the AST entity that declared this type, if any.

Returns the type named by this elaborated type, if applicable.

Returns the element type for this array, complex, or vector type, if applicable.

Returns the exception specification of this type, if applicable.

Returns the fields in this record type, if applicable.

Return the type that was modified by this attributed type.

Returns the nullability of this pointer type, if applicable.

Returns the encoding of this Objective-C type, if applicable.

Returns the base type of this Objective-C type, if applicable.

Returns the declarations for all protocol references for this Objective-C type, if applicable.

Returns the type arguments for this Objective-C type, if applicable.

Returns the pointee type for this pointer type, if applicable.

Returns the ref qualifier for this C++ function or method type, if applicable.

Returns the result type for this function or method type, if applicable.

Returns the size of this constant array or vector type, if applicable.

Returns the template argument types for this template class specialization type, if applicable.

Returns the typedef name of this type, if applicable.

Returns whether this type is qualified with const.

Returns whether this type is an elaborated type, if it can be determined for certain.

Returns whether this type is plain old data (POD).

Returns whether this type is qualified with restrict.

Returns whether this type is a transparent tag typedef.

Returns whether this type is a variadic function type.

Returns whether this type is qualified with volatile.

Visits the fields in this record type, returning None if this type is not a record type and returning Some(b) otherwise where b indicates whether visitation was ended by the callback returning false.

Returns whether this type is an integer type.

Returns whether this type is a signed integer type.

Returns whether this type is an unsigned integer type.

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

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

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.