Struct parse_tree::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]

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 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 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 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 !=.

Auto Trait Implementations

impl Send for TextRange

impl Sync for TextRange