Struct clang::SourceRange [] [src]

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

A half-open range in a source file.

Methods

impl<'tu> SourceRange<'tu>
[src]

fn new(start: SourceLocation<'tu>, end: SourceLocation<'tu>) -> SourceRange<'tu>

Constructs a new SourceRange that spans [start, end).

fn get_end(&self) -> SourceLocation<'tu>

Returns the exclusive end of this source range.

fn get_start(&self) -> SourceLocation<'tu>

Returns the inclusive start of this source range.

fn tokenize(&self) -> Vec<Token<'tu>>

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>

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl<'tu> Copy for SourceRange<'tu>
[src]

impl<'tu> Eq for SourceRange<'tu>
[src]

impl<'tu> PartialEq for SourceRange<'tu>
[src]

fn eq(&self, other: &SourceRange<'tu>) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Rhs) -> bool
1.0.0

This method tests for !=.

impl<'tu> Debug for SourceRange<'tu>
[src]

fn fmt(&self, formatter: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<'tu> Hash for SourceRange<'tu>
[src]

fn hash<H: Hasher>(&self, hasher: &mut H)

Feeds this value into the state given, updating the hasher as necessary.

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0

Feeds a slice of this type into the state provided.