[−][src]Struct clang::source::File
A source file.
Methods
impl<'tu> File<'tu>
[src]
pub fn get_path(&self) -> PathBuf
[src]
Returns the absolute path to this file.
pub fn get_time(&self) -> time_t
[src]
Returns the last modification time for this file.
pub fn get_id(&self) -> (u64, u64, u64)
[src]
Returns a unique identifier for this file.
pub fn get_module(&self) -> Option<Module<'tu>>
[src]
Returns the module containing this file, if any.
pub fn get_skipped_ranges(&self) -> Vec<SourceRange<'tu>>
[src]
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]
Returns whether this file is guarded against multiple inclusions.
pub fn get_location(&self, line: u32, column: u32) -> SourceLocation<'tu>
[src]
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]
Returns the source location at the supplied character offset in this file.
pub fn get_includes(&self) -> Vec<Entity<'tu>>
[src]
Returns the inclusion directives in this file.
pub fn get_references(&self, entity: Entity<'tu>) -> Vec<Entity<'tu>>
[src]
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]
&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]
&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> PartialEq<File<'tu>> for File<'tu>
[src]
fn eq(&self, other: &File<'tu>) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<'tu> Clone for File<'tu>
[src]
fn clone(&self) -> File<'tu>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'tu> Eq for File<'tu>
[src]
impl<'tu> Copy for File<'tu>
[src]
impl<'tu> Debug for File<'tu>
[src]
impl<'tu> Hash for File<'tu>
[src]
Auto Trait Implementations
impl<'tu> !Send for File<'tu>
impl<'tu> Unpin for File<'tu>
impl<'tu> !Sync for File<'tu>
impl<'tu> UnwindSafe for File<'tu>
impl<'tu> RefUnwindSafe for File<'tu>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,