[−][src]Struct clang::source::File
A source file.
Implementations
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> Clone for File<'tu>
[src]
impl<'tu> Copy for File<'tu>
[src]
impl<'tu> Debug for File<'tu>
[src]
impl<'tu> Eq for File<'tu>
[src]
impl<'tu> Hash for File<'tu>
[src]
fn hash<H: Hasher>(&self, hasher: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'tu> PartialEq<File<'tu>> for File<'tu>
[src]
Auto Trait Implementations
impl<'tu> RefUnwindSafe for File<'tu>
impl<'tu> !Send for File<'tu>
impl<'tu> !Sync for File<'tu>
impl<'tu> Unpin for File<'tu>
impl<'tu> UnwindSafe for File<'tu>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
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>,