Struct clang::Entity [] [src]

pub struct Entity<'tu> {
    // some fields omitted
}

An AST entity.

Methods

impl<'tu> Entity<'tu>
[src]

fn get_accessibility(&self) -> Option<Accessibility>

Returns the accessibility of this declaration or base class specifier, if applicable.

fn get_arguments(&self) -> Option<Vec<Entity<'tu>>>

Returns the arguments of this function or method, if applicable.

fn get_availability(&self) -> Availability

Returns the availability of this AST entity.

fn get_bit_field_width(&self) -> Option<usize>

Returns the width of this bit field, if applicable.

fn get_canonical_entity(&self) -> Entity<'tu>

Returns the canonical entity for this AST entity.

In the C family of languages, some types of entities can be declared multiple times. When there are multiple declarations of the same entity, only one will be considered canonical.

fn get_comment(&self) -> Option<String>

Returns the comment associated with this AST entity, if any.

fn get_comment_brief(&self) -> Option<String>

Returns the brief of the comment associated with this AST entity, if any.

fn get_comment_range(&self) -> Option<SourceRange<'tu>>

Returns the source range of the comment associated with this AST entity, if any.

fn get_completion_string(&self) -> Option<CompletionString>

Returns a completion string for this declaration or macro definition, if applicable.

fn get_children(&self) -> Vec<Entity<'tu>>

Returns the children of this AST entity.

fn get_definition(&self) -> Option<Entity<'tu>>

Returns the AST entity that describes the definition of this AST entity, if any.

fn get_display_name(&self) -> Option<String>

Returns the display name of this AST entity, if any.

The display name of an entity contains additional information that helps identify the entity.

fn get_enum_constant_value(&self) -> Option<(i64, u64)>

Returns the value of this enum constant declaration, if applicable.

fn get_enum_underlying_type(&self) -> Option<Type<'tu>>

Returns the underlying type of this enum declaration, if applicable.

fn get_file(&self) -> Option<File<'tu>>

Returns the file included by this inclusion directive, if applicable.

fn get_kind(&self) -> EntityKind

Returns the categorization of this AST entity.

fn get_language(&self) -> Option<Language>

Returns the language used by this declaration, if applicable.

fn get_lexical_parent(&self) -> Option<Entity<'tu>>

Returns the lexical parent of this AST entity, if any.

fn get_linkage(&self) -> Option<Linkage>

Returns the linkage of this AST entity, if any.

fn get_location(&self) -> Option<SourceLocation<'tu>>

Returns the source location of this AST entity, if any.

fn get_module(&self) -> Option<Module<'tu>>

Returns the module imported by this module import declaration, if applicable.

fn get_name(&self) -> Option<String>

Returns the name of this AST entity, if any.

fn get_name_ranges(&self) -> Vec<SourceRange<'tu>>

Returns the source ranges of the name of this AST entity.

fn get_objc_attributes(&self) -> Option<ObjCAttributes>

Returns which attributes were applied to this Objective-C property, if applicable.

fn get_objc_ib_outlet_collection_type(&self) -> Option<Type<'tu>>

Returns the element type for this Objective-C iboutletcollection attribute, if applicable.

fn get_objc_receiver_type(&self) -> Option<Type<'tu>>

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

fn get_objc_selector_index(&self) -> Option<usize>

Returns the selector index for this Objective-C selector identifier, if applicable.

fn get_objc_type_encoding(&self) -> Option<String>

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

fn get_objc_qualifiers(&self) -> Option<ObjCQualifiers>

Returns which qualifiers were applied to this Objective-C method return or parameter type, if applicable.

fn get_overloaded_declarations(&self) -> Option<Vec<Entity<'tu>>>

Returns the overloaded declarations referenced by this overloaded declaration reference, if applicable.

fn get_overridden_methods(&self) -> Option<Vec<Entity<'tu>>>

Returns the methods that were overridden by this method, if applicable.

fn get_platform_availability(&self) -> Option<Vec<PlatformAvailability>>

Returns the availability of this declaration on the platforms where it is known, if applicable.

fn get_range(&self) -> Option<SourceRange<'tu>>

Returns the source range of this AST entity, if any.

fn get_reference(&self) -> Option<Entity<'tu>>

Returns the AST entity referred to by this AST entity, if any.

fn get_semantic_parent(&self) -> Option<Entity<'tu>>

Returns the semantic parent of this AST entity, if any.

fn get_template(&self) -> Option<Entity<'tu>>

Returns the template declaration this template specialization was instantiated from, if applicable.

fn get_template_kind(&self) -> Option<EntityKind>

Returns the categorization of the template specialization that would result from instantiating this template declaration, if applicable.

fn get_translation_unit(&self) -> &'tu TranslationUnit<'tu>

Returns the translation unit which contains this AST entity.

fn get_type(&self) -> Option<Type<'tu>>

Returns the type of this AST entity, if any.

fn get_typedef_underlying_type(&self) -> Option<Type<'tu>>

Returns the underlying type of this typedef declaration, if applicable.

fn get_usr(&self) -> Option<Usr>

Returns the USR for this AST entity, if any.

fn is_bit_field(&self) -> bool

Returns whether this AST entity is a bit field.

fn is_const_method(&self) -> bool

Returns whether this AST entity is a const method.

fn is_definition(&self) -> bool

Returns whether this AST entity is a declaration and also the definition of that declaration.

fn is_dynamic_call(&self) -> bool

Returns whether this AST entity is a dynamic call.

A dynamic call is either a call to a C++ virtual method or an Objective-C message where the receiver is an object instance, not super or a specific class.

fn is_objc_optional(&self) -> bool

Returns whether this AST entity is an Objective-C method or property declaration with the @optional attribute applied to it.

fn is_pure_virtual_method(&self) -> bool

Returns whether this AST entity is a pure virtual method.

fn is_static_method(&self) -> bool

Returns whether this AST entity is a static method.

fn is_variadic(&self) -> bool

Returns whether this AST entity is a variadic function or method.

fn is_virtual_base(&self) -> bool

Returns whether this AST entity is a virtual base class specifier.

fn is_virtual_method(&self) -> bool

Returns whether this AST entity is a virtual method.

fn visit_children<F: FnMut(Entity<'tu>, Entity<'tu>) -> EntityVisitResult>(&self, f: F) -> bool

Visits the children of this AST entity recursively and returns whether visitation was ended by the callback returning EntityVisitResult::Break.

The first argument of the callback is the AST entity being visited and the second argument is the parent of that AST entity. The return value of the callback determines how visitation will proceed.

fn is_attribute(&self) -> bool

Returns whether this AST entity is categorized as an attribute.

fn is_declaration(&self) -> bool

Returns whether this AST entity is categorized as a declaration.

fn is_expression(&self) -> bool

Returns whether this AST entity is categorized as an expression.

fn is_preprocessing(&self) -> bool

Returns whether this AST entity is categorized as a preprocessing entity.

fn is_reference(&self) -> bool

Returns whether this AST entity is categorized as a reference.

fn is_statement(&self) -> bool

Returns whether this AST entity is categorized as a statement.

fn is_unexposed(&self) -> bool

Returns whether the categorization of this AST entity is unexposed.

Trait Implementations

impl<'tu> Clone for Entity<'tu>
[src]

fn clone(&self) -> Entity<'tu>

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl<'tu> Copy for Entity<'tu>
[src]

impl<'tu> Eq for Entity<'tu>
[src]

impl<'tu> PartialEq for Entity<'tu>
[src]

fn eq(&self, other: &Entity<'tu>) -> bool

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

This method tests for !=.

impl<'tu> Debug for Entity<'tu>
[src]

fn fmt(&self, formatter: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<'tu> Hash for Entity<'tu>
[src]

fn hash<H: Hasher>(&self, hasher: &mut H)

Feeds this value into the state given, updating the hasher as necessary.

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0

Feeds a slice of this type into the state provided.