Struct rowan::TextRange[][src]

pub struct TextRange { /* fields omitted */ }

A range in the text, represented as a pair of TextUnits.

Panics

Slicing a &str with TextRange panics if the result is not a valid utf8 string.

Methods

impl TextRange
[src]

impl TextRange
[src]

The left-inclusive range ([from..to)) between to points in the text

The left-inclusive range ([offset..offset + len)) between to points in the text

The inclusive start of this range

The exclusive end of this range

The length of this range

Is this range empty of any content?

Trait Implementations

impl Index<TextRange> for str
[src]

The returned type after indexing.

Performs the indexing (container[index]) operation.

impl Index<TextRange> for String
[src]

The returned type after indexing.

Performs the indexing (container[index]) operation.

impl<'a> Add<&'a TextUnit> for TextRange
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl<'a> Add<TextUnit> for &'a TextRange
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl<'a, 'b> Add<&'a TextUnit> for &'b TextRange
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl Add<TextUnit> for TextRange
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl Hash for TextRange
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<'a> Sub<&'a TextUnit> for TextRange
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl<'a, 'b> Sub<&'a TextUnit> for &'b TextRange
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl Sub<TextUnit> for TextRange
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl<'a> Sub<TextUnit> for &'a TextRange
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl Display for TextRange
[src]

Formats the value using the given formatter. Read more

impl Clone for TextRange
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for TextRange
[src]

Formats the value using the given formatter. Read more

impl<'a> SubAssign<&'a TextUnit> for TextRange
[src]

Performs the -= operation.

impl SubAssign<TextUnit> for TextRange
[src]

Performs the -= operation.

impl Copy for TextRange
[src]

impl Eq for TextRange
[src]

impl PartialEq<TextRange> for TextRange
[src]

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

This method tests for !=.

impl<'a> AddAssign<&'a TextUnit> for TextRange
[src]

Performs the += operation.

impl AddAssign<TextUnit> for TextRange
[src]

Performs the += operation.

Auto Trait Implementations

impl Send for TextRange

impl Sync for TextRange