[−][src]Struct clang::source::SourceLocation
A location in a source file.
Implementations
impl<'tu> SourceLocation<'tu>
[src]
pub fn get_expansion_location(&self) -> Location<'tu>
[src]
Returns the file, line, column and character offset of this source location.
If this source location is inside a macro expansion, the location of the macro expansion is returned instead.
pub fn get_file_location(&self) -> Location<'tu>
[src]
Returns the file, line, column and character offset of this source location.
If this source location is inside a macro expansion, the location of the macro expansion is returned instead unless this source location is inside a macro argument. In that case, the location of the macro argument is returned.
pub fn get_presumed_location(&self) -> (String, u32, u32)
[src]
Returns the file path, line, and column of this source location taking line directives into account.
pub fn get_spelling_location(&self) -> Location<'tu>
[src]
Returns the file, line, column and character offset of this source location.
pub fn get_entity(&self) -> Option<Entity<'tu>>
[src]
Returns the AST entity at this source location, if any.
pub fn is_in_main_file(&self) -> bool
[src]
Returns whether this source location is in the main file of its translation unit.
pub fn is_in_system_header(&self) -> bool
[src]
Returns whether this source location is in a system header.
Trait Implementations
impl<'tu> Clone for SourceLocation<'tu>
[src]
fn clone(&self) -> SourceLocation<'tu>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'tu> Copy for SourceLocation<'tu>
[src]
impl<'tu> Debug for SourceLocation<'tu>
[src]
impl<'tu> Eq for SourceLocation<'tu>
[src]
impl<'tu> Hash for SourceLocation<'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<SourceLocation<'tu>> for SourceLocation<'tu>
[src]
Auto Trait Implementations
impl<'tu> RefUnwindSafe for SourceLocation<'tu>
impl<'tu> !Send for SourceLocation<'tu>
impl<'tu> !Sync for SourceLocation<'tu>
impl<'tu> Unpin for SourceLocation<'tu>
impl<'tu> UnwindSafe for SourceLocation<'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>,