[−][src]Struct clang::source::SourceRange
A half-open range in a source file.
Implementations
impl<'tu> SourceRange<'tu>
[src]
pub fn new(
start: SourceLocation<'tu>,
end: SourceLocation<'tu>
) -> SourceRange<'tu>
[src]
start: SourceLocation<'tu>,
end: SourceLocation<'tu>
) -> SourceRange<'tu>
Constructs a new SourceRange
that spans [start
, end
).
pub fn get_start(&self) -> SourceLocation<'tu>
[src]
Returns the inclusive start of this source range.
pub fn get_end(&self) -> SourceLocation<'tu>
[src]
Returns the exclusive end of this source range.
pub fn is_in_main_file(&self) -> bool
[src]
Returns whether this source range is in the main file of its translation unit.
pub fn is_in_system_header(&self) -> bool
[src]
Returns whether this source range is in a system header.
pub fn tokenize(&self) -> Vec<Token<'tu>>
[src]
Tokenizes the source code covered by this source range and returns the resulting tokens.
Trait Implementations
impl<'tu> Clone for SourceRange<'tu>
[src]
fn clone(&self) -> SourceRange<'tu>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'tu> Copy for SourceRange<'tu>
[src]
impl<'tu> Debug for SourceRange<'tu>
[src]
impl<'tu> Eq for SourceRange<'tu>
[src]
impl<'tu> Hash for SourceRange<'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<SourceRange<'tu>> for SourceRange<'tu>
[src]
Auto Trait Implementations
impl<'tu> RefUnwindSafe for SourceRange<'tu>
impl<'tu> !Send for SourceRange<'tu>
impl<'tu> !Sync for SourceRange<'tu>
impl<'tu> Unpin for SourceRange<'tu>
impl<'tu> UnwindSafe for SourceRange<'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>,