Struct esparse::ast::SpanT
[−]
[src]
pub struct SpanT<F> { pub file_name: F, pub start: Loc, pub end: Loc, }
A region of source code.
A pair of locations, representing a half-open range, and a file name, identifying the source code in which this region appears.
Fields
file_name: F
The name of the source code.
Often a file name, but can be an arbitrary string like <input>
or even any other type.
start: Loc
The (inclusive) starting location.
end: Loc
The (exclusive) ending location.
Methods
impl<F> SpanT<F>
[src]
fn new(file_name: F, start: Loc, end: Loc) -> Self
[src]
Creates a new SpanT
with the given file name and locations.
fn empty(file_name: F, loc: Loc) -> Self
[src]
Creates an empty SpanT
at the given location, with the given file name.
fn zero(file_name: F) -> Self
[src]
Creates an empty SpanT
with the given file name, pointing to the first position in the file.
Trait Implementations
impl<F: Debug> Debug for SpanT<F>
[src]
impl<F: Clone> Clone for SpanT<F>
[src]
fn clone(&self) -> SpanT<F>
[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<F: Copy> Copy for SpanT<F>
[src]
impl<F: PartialEq> PartialEq for SpanT<F>
[src]
fn eq(&self, __arg_0: &SpanT<F>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &SpanT<F>) -> bool
[src]
This method tests for !=
.
impl<F: Eq> Eq for SpanT<F>
[src]
impl<F: Hash> Hash for SpanT<F>
[src]
fn hash<__HF: Hasher>(&self, __arg_0: &mut __HF)
[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