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]
Trait Implementations
impl Clone for Location
[src]
fn clone(&self) -> Location
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for Location
[src]
impl PartialEq for Location
[src]
fn eq(&self, __arg_0: &Location) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Location) -> bool
[src]
This method tests for !=
.
impl Eq for Location
[src]
impl Debug for Location
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Hash for Location
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Default for Location
[src]
impl AddAssign<usize> for Location
[src]
fn add_assign(&mut self, rhs: usize)
[src]
Performs the +=
operation.
impl Add<usize> for Location
[src]
type Output = Location
The resulting type after applying the +
operator.
fn add(self, rhs: usize) -> Location
[src]
Performs the +
operation.