[][src]Struct clang::source::SourceRange

pub struct SourceRange<'tu> { /* fields omitted */ }

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]

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]

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]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.