[−][src]Struct clang::source::SourceRange
A half-open range in a source file.
Methods
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]
Performs copy-assignment from source
. Read more
impl<'tu> Eq for SourceRange<'tu>
[src]
impl<'tu> Copy for SourceRange<'tu>
[src]
impl<'tu> PartialEq<SourceRange<'tu>> for SourceRange<'tu>
[src]
fn eq(&self, other: &SourceRange<'tu>) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=
.
impl<'tu> Debug for SourceRange<'tu>
[src]
impl<'tu> Hash for SourceRange<'tu>
[src]
Auto Trait Implementations
impl<'tu> !Send for SourceRange<'tu>
impl<'tu> !Sync for SourceRange<'tu>
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,