Struct clang::TranslationUnit [] [src]

pub struct TranslationUnit<'i> { /* fields omitted */ }

A preprocessed and parsed source file.

Methods

impl<'i> TranslationUnit<'i>
[src]

[src]

Constructs a new TranslationUnit from an AST file.

Failures

  • an unknown error occurs

Important traits for Vec<u8>
[src]

Returns the diagnostics for this translation unit.

[src]

Returns the entity for this translation unit.

[src]

Returns the file at the supplied path in this translation unit, if any.

[src]

Returns the memory usage of this translation unit.

Important traits for Vec<u8>
[src]

Returns the AST entities which correspond to the supplied tokens, if any.

[src]

Returns a completer which runs code completion.

[src]

Saves this translation unit to an AST file.

Failures

  • errors in the translation unit prevent saving
  • an unknown error occurs

[src]

Consumes this translation unit and reparses the source file it was created from with the same compiler arguments that were used originally.

Failures

  • an error occurs while deserializing an AST file
  • libclang crashes
  • an unknown error occurs

Trait Implementations

impl<'i> Drop for TranslationUnit<'i>
[src]

[src]

Executes the destructor for this type. Read more

impl<'i> Debug for TranslationUnit<'i>
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'i> !Send for TranslationUnit<'i>

impl<'i> !Sync for TranslationUnit<'i>