Struct luther::Location [] [src]

pub struct Location(_);

An abstract location within a stream of tokens or characters.

Note that Location's are not orderable (that is, Location does not impl Ord or PartialOrd). The value of a Location cannot tell you whether it comes before or after some other Location in the same stream, just whether its equal or not equal to some other Location. It is possible to create a new Location from a usize or by adding a usize to an exising Location.

Panics

Adding a usize to a Location will panic if the resulting Location value is greater than usize::max_value().

Methods

impl Location
[src]

[src]

Create a new Location for a given starting point.

Trait Implementations

impl Clone for Location
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for Location
[src]

impl PartialEq for Location
[src]

[src]

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

[src]

This method tests for !=.

impl Eq for Location
[src]

impl Debug for Location
[src]

[src]

Formats the value using the given formatter. Read more

impl Hash for Location
[src]

[src]

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

1.3.0
[src]

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

impl Default for Location
[src]

[src]

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

impl AddAssign<usize> for Location
[src]

[src]

Performs the += operation.

impl Add<usize> for Location
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl From<usize> for Location
[src]

[src]

Performs the conversion.

Auto Trait Implementations

impl Send for Location

impl Sync for Location