Struct parse_tree::TextUnit[][src]

pub struct TextUnit(_);

An offset into text. Offset is represented as u32 storing number of utf8-bytes, but most of the clients should treat it like opaque measure.

Methods

impl TextUnit
[src]

TextUnit equal to the length of this char.

TextUnit equal to the length of this string.

Panics

Panics if the length of the string is greater than u32::max_value()

Trait Implementations

impl Add<TextUnit> for TextUnit
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl PartialOrd<TextUnit> for TextUnit
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Hash for TextUnit
[src]

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

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

impl Sub<TextUnit> for TextUnit
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl Display for TextUnit
[src]

Formats the value using the given formatter. Read more

impl Clone for TextUnit
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Default for TextUnit
[src]

Returns the "default value" for a type. Read more

impl Debug for TextUnit
[src]

Formats the value using the given formatter. Read more

impl SubAssign<TextUnit> for TextUnit
[src]

Performs the -= operation.

impl Copy for TextUnit
[src]

impl Ord for TextUnit
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl Eq for TextUnit
[src]

impl PartialEq<TextUnit> for TextUnit
[src]

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

This method tests for !=.

impl AddAssign<TextUnit> for TextUnit
[src]

Performs the += operation.

impl From<u32> for TextUnit
[src]

Performs the conversion.

impl From<TextUnit> for u32
[src]

Performs the conversion.

Auto Trait Implementations

impl Send for TextUnit

impl Sync for TextUnit