Struct clang::Type
[−]
[src]
pub struct Type<'tu> { /* fields omitted */ }
The type of an AST entity.
Methods
impl<'tu> Type<'tu>
[src]
pub fn get_kind(&self) -> TypeKind
[src]
Returns the kind of this type.
pub fn get_display_name(&self) -> String
[src]
Returns the display name of this type.
pub fn get_alignof(&self) -> Result<usize, AlignofError>
[src]
Returns the alignment of this type in bytes.
Failures
- this type is a dependent type
- this type is an incomplete type
pub fn get_offsetof<F: AsRef<str>>(
&self,
field: F
) -> Result<usize, OffsetofError>
[src]
&self,
field: F
) -> Result<usize, OffsetofError>
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
pub fn get_sizeof(&self) -> Result<usize, SizeofError>
[src]
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
pub fn get_argument_types(&self) -> Option<Vec<Type<'tu>>>
[src]
Returns the argument types for this function or method type, if applicable.
pub fn get_calling_convention(&self) -> Option<CallingConvention>
[src]
Returns the calling convention specified for this function type, if applicable.
pub fn get_canonical_type(&self) -> Type<'tu>
[src]
Returns the canonical type for this type.
The canonical type is the underlying type with all "sugar" removed (e.g., typedefs).
pub fn get_class_type(&self) -> Option<Type<'tu>>
[src]
Returns the class type for this member pointer type, if applicable.
pub fn get_declaration(&self) -> Option<Entity<'tu>>
[src]
Returns the AST entity that declared this type, if any.
pub fn get_element_type(&self) -> Option<Type<'tu>>
[src]
Returns the element type for this array, complex, or vector type, if applicable.
pub fn get_pointee_type(&self) -> Option<Type<'tu>>
[src]
Returns the pointee type for this pointer type, if applicable.
pub fn get_ref_qualifier(&self) -> Option<RefQualifier>
[src]
Returns the ref qualifier for this C++ function or method type, if applicable.
pub fn get_result_type(&self) -> Option<Type<'tu>>
[src]
Returns the result type for this function or method type, if applicable.
pub fn get_size(&self) -> Option<usize>
[src]
Returns the size of this constant array or vector type, if applicable.
pub fn get_template_argument_types(&self) -> Option<Vec<Option<Type<'tu>>>>
[src]
Returns the template argument types for this template class specialization type, if applicable.
pub fn is_const_qualified(&self) -> bool
[src]
Returns whether this type is qualified with const.
pub fn is_elaborated(&self) -> Option<bool>
[src]
Returns whether this type is an elaborated type, if it can be determined for certain.
pub fn is_pod(&self) -> bool
[src]
Returns whether this type is plain old data (POD).
pub fn is_restrict_qualified(&self) -> bool
[src]
Returns whether this type is qualified with restrict.
pub fn is_variadic(&self) -> bool
[src]
Returns whether this type is a variadic function type.
pub fn is_volatile_qualified(&self) -> bool
[src]
Returns whether this type is qualified with volatile.
pub fn is_integer(&self) -> bool
[src]
Returns whether this type is an integer type.
pub fn is_signed_integer(&self) -> bool
[src]
Returns whether this type is a signed integer type.
pub fn is_unsigned_integer(&self) -> bool
[src]
Returns whether this type is an unsigned integer type.
Trait Implementations
impl<'tu> Copy for Type<'tu>
[src]
impl<'tu> Clone for Type<'tu>
[src]
fn clone(&self) -> Type<'tu>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'tu> Debug for Type<'tu>
[src]
fn fmt(&self, formatter: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'tu> PartialEq for Type<'tu>
[src]
fn eq(&self, other: &Type<'tu>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.