Struct clang::source::File [−][src]
pub struct File<'tu> { /* fields omitted */ }
A source file.
Methods
impl<'tu> File<'tu>
[src]
impl<'tu> File<'tu>
pub fn get_path(&self) -> PathBuf
[src]
pub fn get_path(&self) -> PathBuf
Returns the absolute path to this file.
pub fn get_time(&self) -> time_t
[src]
pub fn get_time(&self) -> time_t
Returns the last modification time for this file.
pub fn get_id(&self) -> (u64, u64, u64)
[src]
pub fn get_id(&self) -> (u64, u64, u64)
Returns a unique identifier for this file.
pub fn get_module(&self) -> Option<Module<'tu>>
[src]
pub fn get_module(&self) -> Option<Module<'tu>>
Returns the module containing this file, if any.
pub fn get_skipped_ranges(&self) -> Vec<SourceRange<'tu>>
[src]
pub fn get_skipped_ranges(&self) -> Vec<SourceRange<'tu>>
Returns the source ranges in this file that were skipped by the preprocessor.
This will always return an empty Vec
if the translation unit that contains this file was
not constructed with a detailed preprocessing record.
pub fn is_include_guarded(&self) -> bool
[src]
pub fn is_include_guarded(&self) -> bool
Returns whether this file is guarded against multiple inclusions.
pub fn get_location(&self, line: u32, column: u32) -> SourceLocation<'tu>
[src]
pub fn get_location(&self, line: u32, column: u32) -> SourceLocation<'tu>
Returns the source location at the supplied line and column in this file.
Panics
line
orcolumn
is0
pub fn get_offset_location(&self, offset: u32) -> SourceLocation<'tu>
[src]
pub fn get_offset_location(&self, offset: u32) -> SourceLocation<'tu>
Returns the source location at the supplied character offset in this file.
pub fn get_includes(&self) -> Vec<Entity<'tu>>
[src]
pub fn get_includes(&self) -> Vec<Entity<'tu>>
Returns the inclusion directives in this file.
pub fn get_references(&self, entity: Entity<'tu>) -> Vec<Entity<'tu>>
[src]
pub fn get_references(&self, entity: Entity<'tu>) -> Vec<Entity<'tu>>
Returns the references to the supplied entity in this file.
pub fn visit_includes<F: FnMut(Entity<'tu>, SourceRange<'tu>) -> bool>(
&self,
f: F
) -> bool
[src]
pub fn visit_includes<F: FnMut(Entity<'tu>, SourceRange<'tu>) -> bool>(
&self,
f: F
) -> bool
Visits the inclusion directives in this file and returns whether visitation was ended by the
callback returning false
.
pub fn visit_references<F: FnMut(Entity<'tu>, SourceRange<'tu>) -> bool>(
&self,
entity: Entity<'tu>,
f: F
) -> bool
[src]
pub fn visit_references<F: FnMut(Entity<'tu>, SourceRange<'tu>) -> bool>(
&self,
entity: Entity<'tu>,
f: F
) -> bool
Visits the references to the supplied entity in this file and returns whether visitation was
ended by the callback returning false
.
Trait Implementations
impl<'tu> Copy for File<'tu>
[src]
impl<'tu> Copy for File<'tu>
impl<'tu> Clone for File<'tu>
[src]
impl<'tu> Clone for File<'tu>
fn clone(&self) -> File<'tu>
[src]
fn clone(&self) -> File<'tu>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<'tu> Debug for File<'tu>
[src]
impl<'tu> Debug for File<'tu>
fn fmt(&self, formatter: &mut Formatter) -> Result
[src]
fn fmt(&self, formatter: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'tu> PartialEq for File<'tu>
[src]
impl<'tu> PartialEq for File<'tu>
fn eq(&self, other: &File<'tu>) -> bool
[src]
fn eq(&self, other: &File<'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[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<'tu> Eq for File<'tu>
[src]
impl<'tu> Eq for File<'tu>
impl<'tu> Hash for File<'tu>
[src]
impl<'tu> Hash for File<'tu>